threads / patch / 8710

patchgit-merge: record merge strategy in the log message on auto resolved merges

Subject: [PATCH] git-merge: record merge strategy in the log message on auto resolved merges

## tl;dr

3 messages between Jun 25, 2007 and Jun 25, 2007. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Gerrit Pape· Jun 25, 2007, 07:16 UTC · lore

If a strategy module auto resolved the merge cleanly, record the used strategy in the log message, e.g.:

  Merge branch 'maint' using strategy ours
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
> I personally find this useful especially for the 'ours' strategy.

Resend, maybe it's not that interesting, there was no followup when sent the first time.

 git-merge.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to git-merge.sh +2 −1
diff --git a/git-merge.sh b/git-merge.sh
index 981d69d..b661f74 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -440,7 +440,8 @@ done
 if test '' != "$result_tree"
 then
     parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
-    result_commit=$(printf '%s\n' "$merge_msg" | git-commit-tree $result_tree $parents) || exit
+    result_commit=$(printf '%s\n' "$merge_msg using strategy $wt_strategy" |
+	git-commit-tree $result_tree $parents) || exit
     finish "$result_commit" "Merge made by $wt_strategy."
     dropsave
     exit 0
-- 
1.5.2
Junio C Hamano· Jun 25, 2007, 07:50 UTC · re: Gerrit Pape · lore

Re: [PATCH] git-merge: record merge strategy in the log message on auto resolved merges

Gerrit Pape <pape@smarden.org> writes:
Show 9 quoted lines
> If a strategy module auto resolved the merge cleanly, record the used
> strategy in the log message, e.g.:
>
>   Merge branch 'maint' using strategy ours
>
> Signed-off-by: Gerrit Pape <pape@smarden.org>
> ---
>
>> I personally find this useful especially for the 'ours' strategy.

I really do not think we want to do this, especially when the user did not specify anything unusual like "ours".

At least, exclude recursive and octopus out of it, please.
Johannes Schindelin· Jun 25, 2007, 07:53 UTC · re: Gerrit Pape · lore

Re: [PATCH] git-merge: record merge strategy in the log message on auto resolved merges

Hi,
On Mon, 25 Jun 2007, Gerrit Pape wrote:
> If a strategy module auto resolved the merge cleanly, record the used
> strategy in the log message

Why only when it merged cleanly? If that information is useful, it is _especially_ useful when you had conflicts, so that you know how to recreate the merge?

Ciao, Dscho

← back to recent threads