Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-gui: maintain backwards compatibility for merge syntax
author
Pat Thoyts
<patthoyts@users.sourceforge.net>
Tue, 4 Oct 2016 11:49:05 +0000
(12:49 +0100)
committer
Pat Thoyts
<patthoyts@users.sourceforge.net>
Tue, 4 Oct 2016 22:14:05 +0000
(23:14 +0100)
Commit
b5f325c
updated to use the newer merge syntax but continue to
support older versions of git.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/merge.tcl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
52f2445
)
diff --git
a/lib/merge.tcl
b/lib/merge.tcl
index 2b10a983898c8d918a68f2fbb70c9d3973de2797..9f253db5b37e5633c19914248a58a3f2feb3c512 100644
(file)
--- a/
lib/merge.tcl
+++ b/
lib/merge.tcl
@@
-112,7
+112,16
@@
method _start {} {
close $fh
set _last_merged_branch $branch
close $fh
set _last_merged_branch $branch
- set cmd [list git merge --strategy=recursive FETCH_HEAD]
+ if {[git-version >= "2.5.0"]} {
+ set cmd [list git merge --strategy=recursive FETCH_HEAD]
+ } else {
+ set cmd [list git]
+ lappend cmd merge
+ lappend cmd --strategy=recursive
+ lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]
+ lappend cmd HEAD
+ lappend cmd $name
+ }
ui_status [mc "Merging %s and %s..." $current_branch $stitle]
set cons [console::new [mc "Merge"] "merge $stitle"]
ui_status [mc "Merging %s and %s..." $current_branch $stitle]
set cons [console::new [mc "Merge"] "merge $stitle"]