git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gitk --follow doesn't show changes correctly
@ 2012-06-21 12:56 Petr Onderka
  2012-06-21 13:09 ` Johannes Sixt
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Onderka @ 2012-06-21 12:56 UTC (permalink / raw)
  To: git

Hi,

if I try to see the history of a file across copies by "gitk --follow file",
it seems it shows the correct revisions (although disconnected),
but for revisions that modify the file under some older name,
the diff of those changes is not shown.

For example, I have a file f1, modify it in revision A,
then copy it to f2 and modify it in revision B,
and finally modify f2 in revision C.

If I execute "gitk --follow f2", I can see revisions A, B and C.
But in revision B, the diff shown contains the whole of f2 (as a new file)
and the diff for revision A is completely empty.

What I'd like to see in revision B is the diff between f2 and f1 at that point
and in revision A the diff for f1.

I don't think gitk can do this currently (I'm using v1.7.11.msysgit.0),
so, unless I'm mistaken, consider this as a feature request (or a bug report).

Petr Onderka

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gitk --follow doesn't show changes correctly
  2012-06-21 12:56 gitk --follow doesn't show changes correctly Petr Onderka
@ 2012-06-21 13:09 ` Johannes Sixt
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2012-06-21 13:09 UTC (permalink / raw)
  To: Petr Onderka; +Cc: git

Am 6/21/2012 14:56, schrieb Petr Onderka:
> if I try to see the history of a file across copies by "gitk --follow file",
> it seems it shows the correct revisions (although disconnected),
> but for revisions that modify the file under some older name,
> the diff of those changes is not shown.

--follow is a bolted-on feature. Do not expect it to work according to
your expectations ;)

> For example, I have a file f1, modify it in revision A,
> then copy it to f2 and modify it in revision B,
> and finally modify f2 in revision C.
> 
> If I execute "gitk --follow f2", I can see revisions A, B and C.
> But in revision B, the diff shown contains the whole of f2 (as a new file)
> and the diff for revision A is completely empty.
> 
> What I'd like to see in revision B is the diff between f2 and f1 at that point
> and in revision A the diff for f1.

Turn off "Limit diffs to listed paths" in gitk's settings. Perhaps this
shows the changes (among the changes of all other files per commit, of
course).

-- Hannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-21 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21 12:56 gitk --follow doesn't show changes correctly Petr Onderka
2012-06-21 13:09 ` Johannes Sixt

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 NNTP newsgroup(s).