* diff-filter=R can't identify renaming if not done directly
@ 2020-12-04 14:37 Sofia Syrianidou
2020-12-04 20:07 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Sofia Syrianidou @ 2020-12-04 14:37 UTC (permalink / raw)
To: git
Hello, quick question about using diff-filter in linux. In the scenario
that in my repository, I first copy file1 to file2, then move file2 to
file3 and delete file1, "git diff" returns
diff --git a/file1 b/file3
similarity index 100%
rename from file 1
rename to file3
but running "git diff --diff-filter=r" doesn't return anything. Only
flag T will return the change. Can this be considered as a bug?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: diff-filter=R can't identify renaming if not done directly
2020-12-04 14:37 diff-filter=R can't identify renaming if not done directly Sofia Syrianidou
@ 2020-12-04 20:07 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2020-12-04 20:07 UTC (permalink / raw)
To: Sofia Syrianidou; +Cc: git
Sofia Syrianidou <sofia.syrianidou@suse.com> writes:
> Hello, quick question about using diff-filter in linux. In the scenario
> that in my repository, I first copy file1 to file2, then move file2 to
> file3 and delete file1, "git diff" returns
>
>
> diff --git a/file1 b/file3
>
> similarity index 100%
>
> rename from file 1
>
> rename to file3
>
>
> but running "git diff --diff-filter=r" doesn't return anything. Only
> flag T will return the change. Can this be considered as a bug?
"git diff --diff-filter=r" and "git diff --diff-filter=R" have
totally opposite meanings. I expect nothing to be shown if all your
changes are renames and you ask to exclude all the renamed filepairs
from the output with "--diff-filter=r". In other words, this seems
to be working as intended.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-04 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 14:37 diff-filter=R can't identify renaming if not done directly Sofia Syrianidou
2020-12-04 20:07 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).