Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

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

Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:05:28

Remi Galan Alfonso [off-list ref] writes:
Eric Sunshine [off-list ref] writes:
quoted
quoted
+test_rebase_end () {
+       test_when_finished "git checkout master &&
+       git branch -D $1 &&
+       test_might_fail git rebase --abort" &&
+       git checkout -b $1 master
+}
The way this is indented makes it difficult to see that lines 2 and 3
are continuations of 1. Perhaps format it like this instead?

    test_rebase_end () {
        test_when_finished "git checkout master &&
            git branch -D $1 &&
            test_might_fail git rebase --abort" &&
        git checkout -b $1 master
    }
I completely agree with you, moreover it was indented like this before.
I'll change it in my local version for now.
Perhaps to avoid confusion, stg like:

	test_when_finished "
		... &&
		...
	" &&
	git checkout

(the closing " alone on its line)

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

Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

From: Remi Galan Alfonso <hidden>
Date: 2016-06-15 23:05:28

Matthieu Moy [off-list ref] writes:
Remi Galan Alfonso [off-list ref] writes:
quoted
Eric Sunshine [off-list ref] writes:
quoted
quoted
+test_rebase_end () {
+       test_when_finished "git checkout master &&
+       git branch -D $1 &&
+       test_might_fail git rebase --abort" &&
+       git checkout -b $1 master
+}
The way this is indented makes it difficult to see that lines 2 and 3
are continuations of 1. Perhaps format it like this instead?

    test_rebase_end () {
        test_when_finished "git checkout master &&
            git branch -D $1 &&
            test_might_fail git rebase --abort" &&
        git checkout -b $1 master
    }
I completely agree with you, moreover it was indented like this before.
I'll change it in my local version for now.
Perhaps to avoid confusion, stg like:

        test_when_finished "
                ... &&
                ...
        " &&
        git checkout

(the closing " alone on its line)
I think that the indentation on its own is enough to avoid confusion
test_rebase_end () {
	test_when_finished "git checkout master &&
		git branch -D $1 &&
		test_might_fail git rebase --abort" &&
	git checkout -b $1 master
}
but your idea is fine as well, so I'm ok with either way.

Thanks,
Rémi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help