Re: How to deal with historic tar-balls
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Jan 7, 2012, 01:50 UTC
- Message-ID
- <87lipk46y2.fsf@thomas.inf.ethz.ch>
- In-Reply-To
- <4F079BA1.3060907@gmail.com>
nn6eumtr <nn6eumtr@gmail.com> writes:
Show 7 quoted lines
> Thanks for the response, there is lots of good information there. > > One clarification - can you track renames in git? I tried using git mv > but from the status output it looks like it deleted the old file and > added the new file. I was expecting it to record some sort of > indicator of the name change, instead it looks like a short-cut for > delete & add, the docs aren't clear if that is the case.
Git only stores snapshots; so for an ordinary (non-merge, non-root) commit, you have the "before" (parent) and "after" (commit's) snapshot. Everything is generated on the fly from that, including diffs, heuristic rename detection, pickaxe, ...
To apply rename detection when diffing (e.g. in diff, log, show, format-patch), use the -M flag.
--
Thomas Rast
trast@{inf,student}.ethz.ch