Subject: Re: How to deal with historic tar-balls

From: Thomas Rast <[email-masked]>
Date: Sat, 7 Jan 2012 02:50:13 +0100

nn6eumtr <[email-masked]> writes:

> 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