{"thread":{"id":"44149","subject":"[PATCH] git-gui: stop using deprecated merge syntax","startedAt":"2016-09-24T11:30:51Z","lastAt":"2016-10-03T23:15:48Z","messageCount":7,"participants":["René Scharfe","Johannes Sixt","Junio C Hamano","Stefan Beller","Pat Thoyts"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"302478","messageId":"cbb1815e-0ebc-e103-927e-14d7d038245a@web.de","threadId":"44149","inReplyTo":null,"subject":"[PATCH] git-gui: stop using deprecated merge syntax","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2016-09-24T11:30:22Z","receivedAt":"2016-09-24T11:30:51Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\nwarns when it's called like 'git merge <message> HEAD <commit>' because\nthat syntax is deprecated.  Use this feature in git-gui and get rid of\nthat warning.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\nTested only _very_ lightly!\n\n git-gui/lib/merge.tcl | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)\n\ndiff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl\nindex 460d32f..5ab6f8f 100644\n--- a/git-gui/lib/merge.tcl\n+++ b/git-gui/lib/merge.tcl\n@@ -112,12 +112,7 @@ method _start {} {\n \tclose $fh\n \tset _last_merged_branch $branch\n \n-\tset cmd [list git]\n-\tlappend cmd merge\n-\tlappend cmd --strategy=recursive\n-\tlappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n-\tlappend cmd HEAD\n-\tlappend cmd $name\n+\tset cmd [list git merge --strategy=recursive FETCH_HEAD]\n \n \tui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n \tset cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n-- \n2.10.0\n\n"},{"id":"302482","messageId":"a5b001fd-3ba2-bcc0-2104-eb630796ab09@kdbg.org","threadId":"44149","inReplyTo":"cbb1815e-0ebc-e103-927e-14d7d038245a@web.de","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-24T18:22:28Z","receivedAt":"2016-09-24T18:22:38Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 24.09.2016 um 13:30 schrieb René Scharfe:\n> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n> warns when it's called like 'git merge <message> HEAD <commit>' because\n> that syntax is deprecated.  Use this feature in git-gui and get rid of\n> that warning.\n>\n> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n> ---\n> Tested only _very_ lightly!\n>\n>  git-gui/lib/merge.tcl | 7 +------\n>  1 file changed, 1 insertion(+), 6 deletions(-)\n>\n> diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl\n> index 460d32f..5ab6f8f 100644\n> --- a/git-gui/lib/merge.tcl\n> +++ b/git-gui/lib/merge.tcl\n> @@ -112,12 +112,7 @@ method _start {} {\n>  \tclose $fh\n>  \tset _last_merged_branch $branch\n>\n> -\tset cmd [list git]\n> -\tlappend cmd merge\n> -\tlappend cmd --strategy=recursive\n> -\tlappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n> -\tlappend cmd HEAD\n> -\tlappend cmd $name\n> +\tset cmd [list git merge --strategy=recursive FETCH_HEAD]\n>\n>  \tui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n>  \tset cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n>\n\nMuch better than my version. I had left fmt-merge-msg and added --no-log \nto treat merge.log config suitably. But this works too, and is much more \nobvious.\n\nTested-by: Johannes Sixt <j6t@kdbg.org>\n\n-- Hannes\n\n"},{"id":"302531","messageId":"xmqqvaxjygb2.fsf@gitster.mtv.corp.google.com","threadId":"44149","inReplyTo":"a5b001fd-3ba2-bcc0-2104-eb630796ab09@kdbg.org","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-25T18:39:45Z","receivedAt":"2016-09-25T18:39:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Am 24.09.2016 um 13:30 schrieb René Scharfe:\n>> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n>> warns when it's called like 'git merge <message> HEAD <commit>' because\n>> that syntax is deprecated.  Use this feature in git-gui and get rid of\n>> that warning.\n>>\n>> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n>> ---\n>> Tested only _very_ lightly!\n>>\n>>  git-gui/lib/merge.tcl | 7 +------\n>>  1 file changed, 1 insertion(+), 6 deletions(-)\n>>\n>> diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl\n>> index 460d32f..5ab6f8f 100644\n>> --- a/git-gui/lib/merge.tcl\n>> +++ b/git-gui/lib/merge.tcl\n>> @@ -112,12 +112,7 @@ method _start {} {\n>>  \tclose $fh\n>>  \tset _last_merged_branch $branch\n>>\n>> -\tset cmd [list git]\n>> -\tlappend cmd merge\n>> -\tlappend cmd --strategy=recursive\n>> -\tlappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n>> -\tlappend cmd HEAD\n>> -\tlappend cmd $name\n>> +\tset cmd [list git merge --strategy=recursive FETCH_HEAD]\n>>\n>>  \tui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n>>  \tset cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n>>\n>\n> Much better than my version. I had left fmt-merge-msg and added\n> --no-log to treat merge.log config suitably. But this works too, and\n> is much more obvious.\n>\n> Tested-by: Johannes Sixt <j6t@kdbg.org>\n\nThanks both.\n\nWe can finally deprecate and remove the ancient \"git merge\" syntax\nwith this, which should make me happy, but with git-gui maintainer\nmissing, it nudges me to be an interim maintainer one more time.\n\nSigh...\n"},{"id":"302590","messageId":"CAGZ79kZZwum+97JGL8OFWTdODZeqrEyj4MVMC6o6ynFMOhiFLg@mail.gmail.com","threadId":"44149","inReplyTo":"xmqqvaxjygb2.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-09-26T17:23:29Z","receivedAt":"2016-09-26T17:23:35Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, Sep 25, 2016 at 11:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Sixt <j6t@kdbg.org> writes:\n>\n>> Am 24.09.2016 um 13:30 schrieb René Scharfe:\n>>> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n>>> warns when it's called like 'git merge <message> HEAD <commit>' because\n>>> that syntax is deprecated.  Use this feature in git-gui and get rid of\n>>> that warning.\n>>>\n>>> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n>>> ---\n>>> Tested only _very_ lightly!\n>>>\n>>>  git-gui/lib/merge.tcl | 7 +------\n>>>  1 file changed, 1 insertion(+), 6 deletions(-)\n>>>\n>>> diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl\n>>> index 460d32f..5ab6f8f 100644\n>>> --- a/git-gui/lib/merge.tcl\n>>> +++ b/git-gui/lib/merge.tcl\n>>> @@ -112,12 +112,7 @@ method _start {} {\n>>>      close $fh\n>>>      set _last_merged_branch $branch\n>>>\n>>> -    set cmd [list git]\n>>> -    lappend cmd merge\n>>> -    lappend cmd --strategy=recursive\n>>> -    lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n>>> -    lappend cmd HEAD\n>>> -    lappend cmd $name\n>>> +    set cmd [list git merge --strategy=recursive FETCH_HEAD]\n>>>\n>>>      ui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n>>>      set cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n>>>\n>>\n>> Much better than my version. I had left fmt-merge-msg and added\n>> --no-log to treat merge.log config suitably. But this works too, and\n>> is much more obvious.\n>>\n>> Tested-by: Johannes Sixt <j6t@kdbg.org>\n\nReviewed-by: Stefan Beller <sbeller@google.com>\n"},{"id":"303073","messageId":"87mvilx2ak.fsf@red.patthoyts.tk","threadId":"44149","inReplyTo":"CAGZ79kZZwum+97JGL8OFWTdODZeqrEyj4MVMC6o6ynFMOhiFLg@mail.gmail.com","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2016-10-03T08:30:27Z","receivedAt":"2016-10-03T08:38:55Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n>On Sun, Sep 25, 2016 at 11:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Johannes Sixt <j6t@kdbg.org> writes:\n>>\n>>> Am 24.09.2016 um 13:30 schrieb René Scharfe:\n>>>> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n>>>> warns when it's called like 'git merge <message> HEAD <commit>' because\n>>>> that syntax is deprecated.  Use this feature in git-gui and get rid of\n>>>> that warning.\n>>>>\n>>>> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n>>>> ---\n>>>> Tested only _very_ lightly!\n>>>>\n>>>>  git-gui/lib/merge.tcl | 7 +------\n>>>>  1 file changed, 1 insertion(+), 6 deletions(-)\n>>>>\n>>>> diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl\n>>>> index 460d32f..5ab6f8f 100644\n>>>> --- a/git-gui/lib/merge.tcl\n>>>> +++ b/git-gui/lib/merge.tcl\n>>>> @@ -112,12 +112,7 @@ method _start {} {\n>>>>      close $fh\n>>>>      set _last_merged_branch $branch\n>>>>\n>>>> -    set cmd [list git]\n>>>> -    lappend cmd merge\n>>>> -    lappend cmd --strategy=recursive\n>>>> -    lappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n>>>> -    lappend cmd HEAD\n>>>> -    lappend cmd $name\n>>>> +    set cmd [list git merge --strategy=recursive FETCH_HEAD]\n>>>>\n>>>>      ui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n>>>>      set cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n>>>>\n>>>\n>>> Much better than my version. I had left fmt-merge-msg and added\n>>> --no-log to treat merge.log config suitably. But this works too, and\n>>> is much more obvious.\n>>>\n>>> Tested-by: Johannes Sixt <j6t@kdbg.org>\n>\n>Reviewed-by: Stefan Beller <sbeller@google.com>\n>\n\nThe only problem I see here is that generally git-gui tries to continue\nto work with older versions of git as well. So adding a guard using the\ngit-version procedure should maintain that backwards compatibility.\n\nI suggest:\n\nFrom c2716458f05893ca88c05ce211a295a330e74590 Mon Sep 17 00:00:00 2001\nFrom:  René Scharfe <l.s.r@web.de>\nDate: Sat, 24 Sep 2016 13:30:22 +0200\nSubject: [PATCH] git-gui: stop using deprecated merge syntax\n\nStarting with v2.5.0 git merge can handle FETCH_HEAD internally and\nwarns when it's called like 'git merge <message> HEAD <commit>' because\nthat syntax is deprecated.  Use this feature in git-gui and get rid of\nthat warning.\n\nTested-by: Johannes Sixt <j6t@kdbg.org>\nReviewed-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n lib/merge.tcl | 17 ++++++++++-------\n 1 file changed, 10 insertions(+), 7 deletions(-)\n\ndiff --git a/lib/merge.tcl b/lib/merge.tcl\nindex 460d32f..2361b78 100644\n--- a/lib/merge.tcl\n+++ b/lib/merge.tcl\n@@ -112,13 +112,16 @@ method _start {} {\n \tclose $fh\n \tset _last_merged_branch $branch\n \n-\tset cmd [list git]\n-\tlappend cmd merge\n-\tlappend cmd --strategy=recursive\n-\tlappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n-\tlappend cmd HEAD\n-\tlappend cmd $name\n-\n+\tif {[git-version >= \"2.5.0\"]} {\n+\t\tset cmd [list git merge --strategy=recursive FETCH_HEAD]\n+\t} else {\n+\t\tset cmd [list git]\n+\t\tlappend cmd merge\n+\t\tlappend cmd --strategy=recursive\n+\t\tlappend cmd [git fmt-merge-msg <[gitdir FETCH_HEAD]]\n+\t\tlappend cmd HEAD\n+\t\tlappend cmd $name\n+\t}\n \tui_status [mc \"Merging %s and %s...\" $current_branch $stitle]\n \tset cons [console::new [mc \"Merge\"] \"merge $stitle\"]\n \tconsole::exec $cons $cmd [cb _finish $cons]\n-- \n2.10.0.windows.1\n"},{"id":"303075","messageId":"5283506a-9399-6ddc-d714-1dd9d2b49704@web.de","threadId":"44149","inReplyTo":"87mvilx2ak.fsf@red.patthoyts.tk","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2016-10-03T09:45:46Z","receivedAt":"2016-10-03T09:46:19Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 03.10.2016 um 10:30 schrieb Pat Thoyts:\n> The only problem I see here is that generally git-gui tries to continue\n> to work with older versions of git as well. So adding a guard using the\n> git-version procedure should maintain that backwards compatibility.\n\nMakes sense for a stand-alone tool.\n\n> I suggest:\n>\n> From c2716458f05893ca88c05ce211a295a330e74590 Mon Sep 17 00:00:00 2001\n> From:  René Scharfe <l.s.r@web.de>\n> Date: Sat, 24 Sep 2016 13:30:22 +0200\n> Subject: [PATCH] git-gui: stop using deprecated merge syntax\n>\n> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n> warns when it's called like 'git merge <message> HEAD <commit>' because\n> that syntax is deprecated.  Use this feature in git-gui and get rid of\n> that warning.\n>\n> Tested-by: Johannes Sixt <j6t@kdbg.org>\n> Reviewed-by: Stefan Beller <sbeller@google.com>\n> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nOK, but perhaps move me from From: to Original-patch-by: as the version \ncheck is a big enough change in itself.  Or add a separate commit for \nit.  Or at least mention that you added the check in the commit message.\n\nThanks,\nRené\n"},{"id":"303163","messageId":"87int9t46a.fsf@red.patthoyts.tk","threadId":"44149","inReplyTo":"5283506a-9399-6ddc-d714-1dd9d2b49704@web.de","subject":"Re: [PATCH] git-gui: stop using deprecated merge syntax","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2016-10-03T23:15:41Z","receivedAt":"2016-10-03T23:15:48Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"René Scharfe <l.s.r@web.de> writes:\n\n>Am 03.10.2016 um 10:30 schrieb Pat Thoyts:\n>> The only problem I see here is that generally git-gui tries to continue\n>> to work with older versions of git as well. So adding a guard using the\n>> git-version procedure should maintain that backwards compatibility.\n>\n>Makes sense for a stand-alone tool.\n>\n>> I suggest:\n>>\n>> From c2716458f05893ca88c05ce211a295a330e74590 Mon Sep 17 00:00:00 2001\n>> From:  René Scharfe <l.s.r@web.de>\n>> Date: Sat, 24 Sep 2016 13:30:22 +0200\n>> Subject: [PATCH] git-gui: stop using deprecated merge syntax\n>>\n>> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and\n>> warns when it's called like 'git merge <message> HEAD <commit>' because\n>> that syntax is deprecated.  Use this feature in git-gui and get rid of\n>> that warning.\n>>\n>> Tested-by: Johannes Sixt <j6t@kdbg.org>\n>> Reviewed-by: Stefan Beller <sbeller@google.com>\n>> Signed-off-by: Rene Scharfe <l.s.r@web.de>\n>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n>\n>OK, but perhaps move me from From: to Original-patch-by: as the\n>version check is a big enough change in itself.  Or add a separate\n>commit for it.  Or at least mention that you added the check in the\n>commit message.\n>\n>Thanks,\n>René\n\nAs this is one of the ones already staged to git's 'next' I'll make this\nas a separate commit on top.\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"}]}