git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Gerrit Pape <pape@smarden.org>
Date
Jun 25, 2007, 07:16 UTC
Message-ID
<20070625071624.7919.qmail@82fa8ed4561cac.315fe32.mid.smarden.org>

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(-)
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
Next: Junio C Hamano
Message 1 of 3 in “git-merge: record merge strategy in the log message on auto resolved merges”
  1. git-merge: record merge strategy in the log message on auto resolved mergesGerrit Pape, Jun 25, 2007
  2. Junio C HamanoJun 25, 2007
  3. Johannes SchindelinJun 25, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.