git: 5f4c87e6503c - main - git-mfc: Allow merging merge commits

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Mon, 06 Jul 2026 20:03:12 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=5f4c87e6503cd0e1644b86201eafdb11e7e53b90

commit 5f4c87e6503cd0e1644b86201eafdb11e7e53b90
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-07-06 19:58:47 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-07-06 20:02:34 +0000

    git-mfc: Allow merging merge commits
    
    In order to merge merge commits (such as vendor imports), we need to
    tell git cherry-pick which of the two branches referenced in the commit
    is the mainline.  In our case, it is always the first.
    
    Approved by:    markj
---
 tools/tools/git/git-mfc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tools/git/git-mfc b/tools/tools/git/git-mfc
index 181432fad523..c3ff474add3e 100755
--- a/tools/tools/git/git-mfc
+++ b/tools/tools/git/git-mfc
@@ -358,7 +358,7 @@ def pending(repo, upstream, author=None, baking=False):
 
 def cherry_pick(commit, edit=False):
     """Cherry-pick a single commit with -x.  Abort on failure."""
-    cmd = ['git', 'cherry-pick', '-x']
+    cmd = ['git', 'cherry-pick', '-x', '-m1']
     if edit:
         cmd.append('-e')
     cmd.append(commit.hexsha)