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

Re: [PATCH] git-gui: stop using deprecated merge syntax

From
Johannes Sixt <j6t@kdbg.org>
Date
Sep 24, 2016, 18:22 UTC
Message-ID
<a5b001fd-3ba2-bcc0-2104-eb630796ab09@kdbg.org>
In-Reply-To
<cbb1815e-0ebc-e103-927e-14d7d038245a@web.de>
Am 24.09.2016 um 13:30 schrieb René Scharfe:
Show 31 quoted lines
> Starting with v2.5.0 git merge can handle FETCH_HEAD internally and
> warns when it's called like 'git merge <message> HEAD <commit>' because
> that syntax is deprecated.  Use this feature in git-gui and get rid of
> that warning.
>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> Tested only _very_ lightly!
>
>  git-gui/lib/merge.tcl | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl
> index 460d32f..5ab6f8f 100644
> --- a/git-gui/lib/merge.tcl
> +++ b/git-gui/lib/merge.tcl
> @@ -112,12 +112,7 @@ method _start {} {
>  	close $fh
>  	set _last_merged_branch $branch
>
> -	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
> +	set cmd [list git merge --strategy=recursive FETCH_HEAD]
>
>  	ui_status [mc "Merging %s and %s..." $current_branch $stitle]
>  	set cons [console::new [mc "Merge"] "merge $stitle"]
>

Much better than my version. I had left fmt-merge-msg and added --no-log to treat merge.log config suitably. But this works too, and is much more obvious.

Tested-by: Johannes Sixt <j6t@kdbg.org>
-- Hannes
Previous: René ScharfeNext: Junio C Hamano
Message 2 of 7 in “git-gui: stop using deprecated merge syntax”
  1. git-gui: stop using deprecated merge syntaxRené Scharfe, Sep 24, 2016
  2. Johannes SixtSep 24, 2016
  3. Junio C HamanoSep 25, 2016
  4. Stefan BellerSep 26, 2016
  5. Pat ThoytsOct 3, 2016
  6. René ScharfeOct 3, 2016
  7. Pat ThoytsOct 3, 2016

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.