# Rename/copy detection - options/display improvement proposition

2 messages from 2011-03-03 to 2011-03-03. Participants: Piotr Krukowiecki.
Thread: https://gitlist.dev/t/26649

## Piotr Krukowiecki, 2011-03-03 15:49

Subject: Rename/copy detection - options/display improvement proposition
Message-ID: <AANLkTimbvWLCxf6HM-f_z30uUE-Nbpf-tcNzd8GbgK2C@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimbvWLCxf6HM-f_z30uUE-Nbpf-tcNzd8GbgK2C%40mail.gmail.com

```
Hi,

I think that:

   1. git-status should accept -M<n> -C<n>, same as git-diff
   2. git-diff should have an option to omit diff for deleted files


1. git-status incorrectly recognizes some changes as copied, e.g.:

# Changes to be committed:
#	copied:     SimpleMatcher.h -> BSlashMatcher.h
#	copied:     SimpleMatcher.h -> StringMatcher.h
#	renamed:  SimpleMatcher.h -> TabMatcher.h

(generally SimpleMatcher.h is recognized as being copied into many
different headers)

git-diff shows similarity index 50-60%.
git-diff -M80 -C80 correctly stops recognizing this as copies/renames.

I think git-status also should learn -M and -C, as it works the same
way as git-diff with defaults.


2. git-diff does not show diff for copied files. But when a files is
removed, the diff is shown.

I think seeing what was deleted is sometimes useful, but sometimes it
is not and just clutters the
diff.



-- 
Piotrek

```

## Piotr Krukowiecki, 2011-03-03 15:54

Subject: Re: Rename/copy detection - options/display improvement proposition
Message-ID: <AANLkTin0BJFc1a9SHbou1b=aZA+ta50MAFbFZWYTc8ka@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTin0BJFc1a9SHbou1b%3DaZA%2Bta50MAFbFZWYTc8ka%40mail.gmail.com
In-Reply-To: <AANLkTimbvWLCxf6HM-f_z30uUE-Nbpf-tcNzd8GbgK2C@mail.gmail.com>

```
On Thu, Mar 3, 2011 at 4:49 PM, Piotr Krukowiecki
<piotr.krukowiecki@gmail.com> wrote:
> Hi,
>
> I think that:
>
>   1. git-status should accept -M<n> -C<n>, same as git-diff
>   2. git-diff should have an option to omit diff for deleted files
>
>
> 1. git-status incorrectly recognizes some changes as copied, e.g.:
>
> # Changes to be committed:
> #       copied:     SimpleMatcher.h -> BSlashMatcher.h
> #       copied:     SimpleMatcher.h -> StringMatcher.h
> #       renamed:  SimpleMatcher.h -> TabMatcher.h
>
> (generally SimpleMatcher.h is recognized as being copied into many
> different headers)
>
> git-diff shows similarity index 50-60%.
> git-diff -M80 -C80 correctly stops recognizing this as copies/renames.
>
> I think git-status also should learn -M and -C, as it works the same
> way as git-diff with defaults.
>
>
> 2. git-diff does not show diff for copied files. But when a files is
> removed, the diff is shown.
>
> I think seeing what was deleted is sometimes useful, but sometimes it
> is not and just clutters the
> diff.

I have committed the changes and git-commit, git-log--stat output also
shows the renames - so I suppose this is a global issue

-- 
Piotrek

```
