All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Documentation/git-bisect.txt: add --no-ff to merge command
@ 2019-10-28 22:01 Mihail Atanassov
  2019-10-28 23:54 ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Mihail Atanassov @ 2019-10-28 22:01 UTC (permalink / raw)
  To: git; +Cc: Mihail Atanassov

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.

Changes since v1:
 - removed comment change

Signed-off-by: Mihail Atanassov <m.atanassov92@gmail.com>
---
 Documentation/git-bisect.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 4b45d837a7..7586c5a843 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -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
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Documentation/git-bisect.txt: add --no-ff to merge command
  2019-10-28 22:01 [PATCH v2] Documentation/git-bisect.txt: add --no-ff to merge command Mihail Atanassov
@ 2019-10-28 23:54 ` Jonathan Nieder
  2019-10-29  2:28   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2019-10-28 23:54 UTC (permalink / raw)
  To: Mihail Atanassov; +Cc: git

Mihail Atanassov wrote:

> 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.

Makes sense.

> Changes since v1:
>  - removed comment change

This kind of note, that doesn't need to be recorded in the Git commit
history, should go after the "---" marker.  See [1]:

  You often want to add additional explanation about the patch, other
  than the commit message itself. Place such "cover letter" material
  between the three-dash line and the diffstat. For patches requiring
  multiple iterations of review and discussion, an explanation of
  changes between each iteration can be kept in Git-notes and inserted
  automatically following the three-dash line via `git format-patch
  --notes`.

> Signed-off-by: Mihail Atanassov <m.atanassov92@gmail.com>
> ---
>  Documentation/git-bisect.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Except for that one nit,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

[1] https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#send-patches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Documentation/git-bisect.txt: add --no-ff to merge command
  2019-10-28 23:54 ` Jonathan Nieder
@ 2019-10-29  2:28   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2019-10-29  2:28 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Mihail Atanassov, git

Jonathan Nieder <jrnieder@gmail.com> writes:

> Mihail Atanassov wrote:
>
>> 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.
>
> Makes sense.
>
>> Changes since v1:
>>  - removed comment change
>
> This kind of note, that doesn't need to be recorded in the Git commit
> history, should go after the "---" marker.  See [1]:

Thanks for mentoring.  No need to resend as I can edit it out while
queuing.

Thanks both.

>
>   You often want to add additional explanation about the patch, other
>   than the commit message itself. Place such "cover letter" material
>   between the three-dash line and the diffstat. For patches requiring
>   multiple iterations of review and discussion, an explanation of
>   changes between each iteration can be kept in Git-notes and inserted
>   automatically following the three-dash line via `git format-patch
>   --notes`.
>
>> Signed-off-by: Mihail Atanassov <m.atanassov92@gmail.com>
>> ---
>>  Documentation/git-bisect.txt | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Except for that one nit,
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Thanks.
>
> [1] https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#send-patches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-29  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 22:01 [PATCH v2] Documentation/git-bisect.txt: add --no-ff to merge command Mihail Atanassov
2019-10-28 23:54 ` Jonathan Nieder
2019-10-29  2:28   ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.