]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation/git-bisect.txt: add --no-ff to merge command
authorMihail Atanassov <m.atanassov92@gmail.com>
Mon, 28 Oct 2019 22:01:22 +0000 (22:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Oct 2019 02:53:56 +0000 (11:53 +0900)
The hotfix application example uses `git merge --no-commit` to apply
temporary changes to the working tree during a bisect operation. In some
situations this can be a fast-forward and `merge` will apply the hotfix
branch's commits regardless of `--no-commit` (as documented in the `git
merge` manual).

In the pathological case this will make a `git bisect run` invocation
loop indefinitely between the first bisect step and the fast-forwarded
post-merge HEAD.

Add `--no-ff` to the merge command to avoid this issue.

Signed-off-by: Mihail Atanassov <m.atanassov92@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-bisect.txt

index 4b45d837a7e7c590fe3aa5f575009c43342b833c..7586c5a8437edfc146fa3b802bc5e72e5070ee9a 100644 (file)
@@ -413,7 +413,7 @@ $ cat ~/test.sh
 
 # tweak the working tree by merging the hot-fix branch
 # and then attempt a build
-if     git merge --no-commit hot-fix &&
+if     git merge --no-commit --no-ff hot-fix &&
        make
 then
        # run project specific test and report its status