Re: Black smoke from git rebase -i exec

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Black smoke from git rebase -i exec

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:49:17

Ævar Arnfjörð Bjarmason [off-list ref] writes:
There's some black smoke in pu after the git rebase -i series was
applied: http://smoke.git.nix.is/app/projects/report_details/14
Strange, I can't reproduce this on my box (tried on RHEL x86_64 and
Debian i686).
    expecting success:
...
    	rm -f touch-*

    Switched to a new branch 'master'
At this point, I get 

rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E

rebase -i script after editing:
pick 313fe96 B
exec touch touch-one
pick d0f65f2 C
exec touch touch-two
exec false
exec touch touch-three
pick 0547e3f D
pick 8f99a4f E
exec touch "touch-file  name with spaces"; touch touch-after-semicolon

which you don't seem to get on your side. I get the same as you if I
comment out the "set_fake_editor" line at the top of the script. So, I
suspect there's something very wrong that prevents it from doing its
job.

Can you add some debug

echo "$EDITOR"
echo "$FAKE_EDITOR"

somewhere in the test to see what happens?
    Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
    Stopped at wrong revision:
    (E instead of C)
    Stopped at wrong revision:
    (E instead of master)
(here, it's definitely doing as if the todolist had not been edited)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: Black smoke from git rebase -i exec

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:17

On Tue, Aug 10, 2010 at 13:37, Matthieu Moy
[off-list ref] wrote:
Ęvar Arnfjörš Bjarmason [off-list ref] writes:
quoted
There's some black smoke in pu after the git rebase -i series was
applied: http://smoke.git.nix.is/app/projects/report_details/14
Strange, I can't reproduce this on my box (tried on RHEL x86_64 and
Debian i686).
Hi. The issue appears to be that there's some non-POSIX code in your
patch (but I didn't check what). The test works for me with bash, but
fails with dash (which is the Debian testing /bin/sh).

Can you try with dash or some other non-bash POSIX shell and see if it
fails?

Re: Black smoke from git rebase -i exec

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:49:17

Am 8/10/2010 15:57, schrieb Ævar Arnfjörð Bjarmason:
On Tue, Aug 10, 2010 at 13:37, Matthieu Moy
[off-list ref] wrote:
quoted
Ęvar Arnfjörš Bjarmason [off-list ref] writes:
quoted
There's some black smoke in pu after the git rebase -i series was
applied: http://smoke.git.nix.is/app/projects/report_details/14
Strange, I can't reproduce this on my box (tried on RHEL x86_64 and
Debian i686).
Hi. The issue appears to be that there's some non-POSIX code in your
patch (but I didn't check what). The test works for me with bash, but
fails with dash (which is the Debian testing /bin/sh).

Can you try with dash or some other non-bash POSIX shell and see if it
fails?
The culprit is commands like these:

	FAKE_LINES="exec_echo_foo_>file1 1" \
		test_must_fail git rebase -i HEAD^ &&

You cannot apply single-command-export if the command is a shell function.
You must rewrite this as:

	(
		export FAKE_LINES="..." &&
		test_must_fail git rebase ....
	) &&

-- Hannes

Re: Black smoke from git rebase -i exec

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:17

On Tue, Aug 10, 2010 at 14:12, Johannes Sixt [off-list ref] wrote:
You cannot apply single-command-export if the command is a shell function.
You must rewrite this as:

       (
               export FAKE_LINES="..." &&
               test_must_fail git rebase ....
       ) &&
Except that's not portable either, it should be:

    FAKE_LINES="..." &&
    export FAKE_LINES &&
	test_must_fail git rebase ...

See the other examples in t3404-rebase-interactive.sh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help