threads / discuss / 14861

git show doesn't respect config: diff.renames=copies

Subject: git show doesn't respect config: diff.renames=copies

## tl;dr

4 messages between Aug 6, 2008 and Aug 6, 2008.

replies: 3people: 3as markdown or json

Stephen R. van den Berg· Aug 6, 2008, 11:43 UTC · lore

What do I need to enter in /etc/gitconfig to get all commands that deal with diffs of some kind to honour renames=copies ?

-- 
Sincerely,
           Stephen R. van den Berg.

If there's a hard way to do something, I'm there before anyone else.
Jeff King· Aug 6, 2008, 14:06 UTC · re: Stephen R. van den Berg · lore

Re: git show doesn't respect config: diff.renames=copies

On Wed, Aug 06, 2008 at 01:43:40PM +0200, Stephen R. van den Berg wrote:
> What do I need to enter in /etc/gitconfig to get all commands that
> deal with diffs of some kind to honour renames=copies ?

$ git grep -A3 diff.renames config.txt:diff.renames:: config.txt- Tells git to detect renames. If set to any boolean value, it config.txt- will enable basic rename detection. If set to "copies" or config.txt- "copy", it will detect copies, as well.

-Peff
Björn Steinbrink· Aug 6, 2008, 14:15 UTC · re: Jeff King · lore

Re: git show doesn't respect config: diff.renames=copies

On 2008.08.06 10:06:03 -0400, Jeff King wrote:
Show 10 quoted lines
> On Wed, Aug 06, 2008 at 01:43:40PM +0200, Stephen R. van den Berg wrote:
> 
> > What do I need to enter in /etc/gitconfig to get all commands that
> > deal with diffs of some kind to honour renames=copies ?
> 
> $ git grep -A3 diff.renames
> config.txt:diff.renames::
> config.txt-     Tells git to detect renames.  If set to any boolean value, it
> config.txt-     will enable basic rename detection.  If set to "copies" or
> config.txt-     "copy", it will detect copies, as well.
See subject line ;-)

Works for me though. Stephen, probably the source file didn't change in the same commit. In such a case you need --find-copies-harder, and that seems not to be configurable as the default.

Björn
Jeff King· Aug 6, 2008, 15:25 UTC · re: Björn Steinbrink · lore

Re: git show doesn't respect config: diff.renames=copies

On Wed, Aug 06, 2008 at 04:15:59PM +0200, Björn Steinbrink wrote:
Show 7 quoted lines
> > $ git grep -A3 diff.renames
> > config.txt:diff.renames::
> > config.txt-     Tells git to detect renames.  If set to any boolean value, it
> > config.txt-     will enable basic rename detection.  If set to "copies" or
> > config.txt-     "copy", it will detect copies, as well.
> 
> See subject line ;-)
Heh. Yes, oops. His question makes a lot more sense now. ;)
> Works for me though. Stephen, probably the source file didn't change in
> the same commit. In such a case you need --find-copies-harder, and that
> seems not to be configurable as the default.

I don't think it is configurable. Probably a "copiesharder" option for diff.renames would be a sane addition.

-Peff

← back to recent threads