Skip to contentSkip to conversation

history of a renamed file

DISCUSSION Christoph Duelli 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Given a repo that contains a file x.c
that got renamed from
some/path/x.c
to
new/location/x.c

Is it possible (ideally with gitk) to view the complete history of what is now new/location/x.c *including* the history of changes that occurred when it stil was some/path/x.c? When I say "gitk new/location/x.c" I get just the changes made starting with the rename.
When I call "gitk" and look for the changeset, the rename is detected, though. Therefore I hope that it is somehow possible to obtain the complete file-specific history without truncation at renames.

Any ideas?

Thank you, best regards
Christoph

#1 lore raw
Quoted 15 lines · Christoph Duelli

Given a repo that contains a file x.c
that got renamed from
some/path/x.c
to
new/location/x.c

Is it possible (ideally with gitk) to view the complete history of what is now new/location/x.c *including* the history of changes that occurred when it stil was some/path/x.c?
When I say "gitk new/location/x.c" I get just the changes made starting with the rename.
When I call "gitk" and look for the changeset, the rename is detected, though. Therefore I hope that it is somehow possible to obtain the complete file-specific history without truncation at renames.

Quoted 1 line

Any ideas?

Try --follow option, see git-log(1), although I'm not sure if gitk supports it (it should).

Signature · 3 lines
Jakub Narebski
Poland
ShadeHawk on #git
#2 lore raw

Jakub Narebski wrote (2008-04-23 06:25 -0700):

Quoted 8 lines
Quoted 3 lines · Christoph Duelli

Is it possible (ideally with gitk) to view the complete history of what is now new/location/x.c *including* the history of changes that occurred when it stil was some/path/x.c?

Try --follow option, see git-log(1), although I'm not sure if gitk supports it (it should).

gitk certainly accepts '--follow' but the option does not work as expected. For example try

  gitk --follow -- utf8.c

in the Git repository and get surprised. :-)

I noticed the problem two weeks ago and Adam Simpkins elaborated it a bit. See http://thread.gmane.org/gmane.comp.version-control.git/79008

#3 lore raw
In reply to Jakub Narebski
Quoted 17 lines · Jakub Narebski
Quoted 15 lines · Christoph Duelli

Given a repo that contains a file x.c
that got renamed from
some/path/x.c
to
new/location/x.c

Is it possible (ideally with gitk) to view the complete history of what is now new/location/x.c *including* the history of changes that occurred when it stil was some/path/x.c?
When I say "gitk new/location/x.c" I get just the changes made starting with the rename.
When I call "gitk" and look for the changeset, the rename is detected, though. Therefore I hope that it is somehow possible to obtain the complete file-specific history without truncation at renames.

Quoted 4 lines
Quoted 1 line

Any ideas?

Try --follow option, see git-log(1), although I'm not sure if gitk supports it (it should).

Works, thank you!

Signature · 1 line
Christoph Duelli