Skip to content

Commit 82fbd8a

Browse files
committed
git-gui: maintain backwards compatibility for merge syntax
Commit b5f325c updated to use the newer merge syntax but continue to support older versions of git. Signed-off-by: Pat Thoyts <[email protected]>
1 parent 52f2445 commit 82fbd8a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/merge.tcl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,16 @@ method _start {} {
112112
close $fh
113113
set _last_merged_branch $branch
114114

115-
set cmd [list git merge --strategy=recursive FETCH_HEAD]
115+
if {[git-version >= "2.5.0"]} {
116+
set cmd [list git merge --strategy=recursive FETCH_HEAD]
117+
} else {
118+
set cmd [list git]
119+
lappend cmd merge
120+
lappend cmd --strategy=recursive
121+
lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]
122+
lappend cmd HEAD
123+
lappend cmd $name
124+
}
116125

117126
ui_status [mc "Merging %s and %s..." $current_branch $stitle]
118127
set cons [console::new [mc "Merge"] "merge $stitle"]

0 commit comments

Comments
 (0)