Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:28

Junio C Hamano [off-list ref] writes:
Galan Rémi  [off-list ref] writes:
quoted
+test_rebase_end () {
+	test_when_finished "git checkout master &&
+	git branch -D $1 &&
Is this one guaranteed to succeed?  Do we want to consider it a
failure to remove "$1" (e.g. dropTest)?

    $ git branch -D no-such-branch ; echo $?
    error: branch 'no-such-branch' not found.
    1

If dropTest branch did not exist before the test that begins with
a call to this function, what happens?

Besides, a function that must be called at the beginning of a test
piece has a name that ends with _end?  That sounds funny, no?
Ah, scratch this last paragraph.  I didn't see this is a
multi-command "when_finished".

But other parts of what I said still stands.  For example, even in a
multi-command "when_finished", "git branch -D $1 &&" if the main
body of the test failed to create the branch "$1", that command
would fail and skip the remainder of the clean-up, so the first
point above is still suspect.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help