# [PATCH v3 1/2] Ensure consistent usage of mergetool.keepBackup in git-gui

7 messages from 2009-04-10 to 2009-04-12. Participants: Ferry Huberts, Junio C Hamano, Ferry Huberts (Pelagic).
Thread: https://gitlist.dev/t/18830

## Ferry Huberts, 2009-04-10 19:33

Subject: [PATCH v3 1/2] Ensure consistent usage of mergetool.keepBackup in git-gui
Message-ID: <f3d401fbaec1556ffbf8c13b83e58849af973a71.1239376248.git.ferry.huberts@pelagic.nl>
URL: https://gitlist.dev/e/f3d401fbaec1556ffbf8c13b83e58849af973a71.1239376248.git.ferry.huberts%40pelagic.nl

```
In several places merge.keepBackup is used i.s.o.
mergetool.keepBackup. This patch makes it all
consistent for git-gui

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
---
Based on pu

Shawn, I think you said you already applied this, I'm still resending to keep
the series complete.

 git-gui/git-gui.sh        |    2 +-
 git-gui/lib/mergetool.tcl |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index e018e07..e4e643a 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -699,7 +699,7 @@ proc apply_config {} {
 
 set default_config(branch.autosetupmerge) true
 set default_config(merge.tool) {}
-set default_config(merge.keepbackup) true
+set default_config(mergetool.keepbackup) true
 set default_config(merge.diffstat) true
 set default_config(merge.summary) false
 set default_config(merge.verbosity) 2
diff --git a/git-gui/lib/mergetool.tcl b/git-gui/lib/mergetool.tcl
index eb2b4b5..b7263b3 100644
--- a/git-gui/lib/mergetool.tcl
+++ b/git-gui/lib/mergetool.tcl
@@ -382,7 +382,7 @@ proc merge_tool_finish {fd} {
 		delete_temp_files $mtool_tmpfiles
 		ui_status [mc "Merge tool failed."]
 	} else {
-		if {[is_config_true merge.keepbackup]} {
+		if {[is_config_true mergetool.keepbackup]} {
 			file rename -force -- $backup "$mtool_target.orig"
 		}
 
-- 
1.6.0.6

```

## Ferry Huberts, 2009-04-10 19:33

Subject: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <9a358c8b6275a7103eb036a2d1d6073bcf191e09.1239376248.git.ferry.huberts@pelagic.nl>
URL: https://gitlist.dev/e/9a358c8b6275a7103eb036a2d1d6073bcf191e09.1239376248.git.ferry.huberts%40pelagic.nl
In-Reply-To: <f3d401fbaec1556ffbf8c13b83e58849af973a71.1239376248.git.ferry.huberts@pelagic.nl>

```
In several places merge.keepBackup is used i.s.o.
mergetool.keepBackup. This patch makes it all
consistent for git

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
---
Based on pu

 git-mergetool.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index efa31a2..2e3e02b 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -257,7 +257,7 @@ prompt_after_failed_merge() {
 merge_tool=$(get_merge_tool "$merge_tool") || exit
 merge_tool_cmd="$(get_merge_tool_cmd "$merge_tool")"
 merge_tool_path="$(get_merge_tool_path "$merge_tool")" || exit
-merge_keep_backup="$(git config --bool merge.keepBackup || echo true)"
+merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
 merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
 merge_tool_trust_exit_code="$(git config --bool mergetool."$merge_tool".trustExitCode || echo false)"
 
-- 
1.6.0.6

```

## Junio C Hamano, 2009-04-11 19:23

Subject: Re: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <7vljq7dmg2.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vljq7dmg2.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <9a358c8b6275a7103eb036a2d1d6073bcf191e09.1239376248.git.ferry.huberts@pelagic.nl>

```
Ferry Huberts <ferry.huberts@pelagic.nl> writes:

> In several places merge.keepBackup is used i.s.o.
> mergetool.keepBackup. This patch makes it all
> consistent for git

A silly question.  The above makes it sound as if both merge.keepBackup
and mergetool.keepBackup are valid, but the latter is preferred, and your
patch makes things consistent even though without it there is nothing
broken per-se.

Is that really is the case?

Otherwise, perhaps the title and the message should read like this:

    Fix misspelled mergetool.keepBackup
    
    In several places mergetool.keepBackup was misspelled as merge.keepBackup.
    
    Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>

```

## Ferry Huberts (Pelagic), 2009-04-11 19:41

Subject: Re: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <49E0F27C.8070203@pelagic.nl>
URL: https://gitlist.dev/e/49E0F27C.8070203%40pelagic.nl
In-Reply-To: <7vljq7dmg2.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano wrote:
> Ferry Huberts <ferry.huberts@pelagic.nl> writes:
> 
>> In several places merge.keepBackup is used i.s.o.
>> mergetool.keepBackup. This patch makes it all
>> consistent for git
> 
> A silly question.  The above makes it sound as if both merge.keepBackup
> and mergetool.keepBackup are valid, but the latter is preferred, and your
> patch makes things consistent even though without it there is nothing
> broken per-se.
> 
> Is that really is the case?
> 
> Otherwise, perhaps the title and the message should read like this:
> 
>     Fix misspelled mergetool.keepBackup
>     
>     In several places mergetool.keepBackup was misspelled as merge.keepBackup.
>     
>     Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>

feel free to change it :-)
imho there has been way too much discussion for such a simple patch.

```

## Ferry Huberts (Pelagic), 2009-04-11 19:44

Subject: Re: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <49E0F33B.8070806@pelagic.nl>
URL: https://gitlist.dev/e/49E0F33B.8070806%40pelagic.nl
In-Reply-To: <49E0F27C.8070203@pelagic.nl>

```
Ferry Huberts (Pelagic) wrote:
> Junio C Hamano wrote:
>> Ferry Huberts <ferry.huberts@pelagic.nl> writes:
>>
>>> In several places merge.keepBackup is used i.s.o.
>>> mergetool.keepBackup. This patch makes it all
>>> consistent for git
>> A silly question.  The above makes it sound as if both merge.keepBackup
>> and mergetool.keepBackup are valid, but the latter is preferred, and your
>> patch makes things consistent even though without it there is nothing
>> broken per-se.
>>
>> Is that really is the case?
>>
>> Otherwise, perhaps the title and the message should read like this:
>>
>>     Fix misspelled mergetool.keepBackup
>>     
>>     In several places mergetool.keepBackup was misspelled as merge.keepBackup.
>>     
>>     Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
> 
> feel free to change it :-)
> imho there has been way too much discussion for such a simple patch.
> 

replying to myself :-)

maybe 'way too much' is a bit strong. I think the part of the discussion
about finding out what actually to do was good. the rest was a bit too
much for my taste. but I'm still getting used to ways of the git.devel
list :-)

```

## Junio C Hamano, 2009-04-11 20:19

Subject: Re: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <7v4owvdju6.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4owvdju6.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <49E0F33B.8070806@pelagic.nl>

```
"Ferry Huberts (Pelagic)" <ferry.huberts@pelagic.nl> writes:

> Ferry Huberts (Pelagic) wrote:
>> Junio C Hamano wrote:
>>> Ferry Huberts <ferry.huberts@pelagic.nl> writes:
>>>
>>>> In several places merge.keepBackup is used i.s.o.
>>>> mergetool.keepBackup. This patch makes it all
>>>> consistent for git
>>> A silly question.  The above makes it sound as if both merge.keepBackup
>>> and mergetool.keepBackup are valid, but the latter is preferred, and your
>>> patch makes things consistent even though without it there is nothing
>>> broken per-se.
>>>
>>> Is that really is the case?
>>>
>>> Otherwise, perhaps the title and the message should read like this:
>>>
>>>     Fix misspelled mergetool.keepBackup
>>>     
>>>     In several places mergetool.keepBackup was misspelled as merge.keepBackup.
>>>     
>>>     Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
>> 
>> feel free to change it :-)

Notice that I didn't follow the discussion closely, and I am asking if
this is a "bugfix" or "changing for consistency even though there is no
breakage".

```

## Ferry Huberts (Pelagic), 2009-04-12 07:04

Subject: Re: [PATCH v3 2/2] Ensure consistent usage of mergetool.keepBackup in git
Message-ID: <49E19262.7090802@pelagic.nl>
URL: https://gitlist.dev/e/49E19262.7090802%40pelagic.nl
In-Reply-To: <7v4owvdju6.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano wrote:
> "Ferry Huberts (Pelagic)" <ferry.huberts@pelagic.nl> writes:
> 
>> Ferry Huberts (Pelagic) wrote:
>>> Junio C Hamano wrote:
>>>> Ferry Huberts <ferry.huberts@pelagic.nl> writes:
>>>>
>>>>> In several places merge.keepBackup is used i.s.o.
>>>>> mergetool.keepBackup. This patch makes it all
>>>>> consistent for git
>>>> A silly question.  The above makes it sound as if both merge.keepBackup
>>>> and mergetool.keepBackup are valid, but the latter is preferred, and your
>>>> patch makes things consistent even though without it there is nothing
>>>> broken per-se.
>>>>
>>>> Is that really is the case?
>>>>
>>>> Otherwise, perhaps the title and the message should read like this:
>>>>
>>>>     Fix misspelled mergetool.keepBackup
>>>>     
>>>>     In several places mergetool.keepBackup was misspelled as merge.keepBackup.
>>>>     
>>>>     Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
>>> feel free to change it :-)
> 
> Notice that I didn't follow the discussion closely, and I am asking if
> this is a "bugfix" or "changing for consistency even though there is no
> breakage".
> 

it's the latter.
summary: docs say mergetool.keepBackup. code does merge.keepBackup

```
