Wireshark mailing list archives
Re: git history of files moved in SVN
From: Peter Wu <lekensteyn () gmail com>
Date: Mon, 14 Apr 2014 23:17:17 +0200
On Monday 14 April 2014 17:07:48 Jeff Morriss wrote:
(That change doesn't show up in the history of epan/dissectors/packet-tcp.c in the Git repository, probably because the SVN-to-Git converter couldn't handle moves/renames in SVN, perhaps because SVN, while handling them better than CVS, still handles them a bit awkwardly.)Ouch--you'd think that this kind of thing would work. I guess none of the dissectors have a history prior to The Great Dissector Move of 2004/7/18. Pity, as I recall a significant portion of the reason to move to SVN (from CVS) was so that files could be moved without losing history.
It is preserved, you just need to add the --follow option to continue the
history after a rename:
git log --follow --stat epan/dissectors/packet-tcp.c
Output:
commit 669db206cb1f270046ad400fff7655e20c63e723
Author: Gilbert Ramirez <gram () alumni rice edu>
Date: Sun Jul 18 18:06:47 2004 +0000
Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.
Adjust #include lines in files that include packet-*.h
files.
svn path=/trunk/; revision=11410
packet-tcp.c => epan/dissectors/packet-tcp.c | 0
1 file changed, 0 insertions(+), 0 deletions(-)
Gits renames are based on heuristics, there is no rename metadata stored.
Sometimes you also want to see renamed files in a single commit with
additional changes. In that case you are looking for the -M option to detect
that (by default there is a similarity index of 50%.) See the manual page git-
log(1) for more details.
Kind regards,
Peter
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: git history of files moved in SVN Jeff Morriss (Apr 14)
- Re: git history of files moved in SVN Peter Wu (Apr 14)
- Re: git history of files moved in SVN Guy Harris (Apr 14)
