git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: nn6eumtrNext: Neal Kreitzinger
Message 11 of 12 in “How to deal with historic tar-balls”
  1. nn6eumtrDec 31, 2011
  2. Tomas CarneckyJan 1, 2012
  3. Philip OakleyJan 1, 2012
  4. Philip OakleyJan 1, 2012
  5. Philip OakleyJan 2, 2012
  6. Dirk SüsserottJan 2, 2012
  7. Philip OakleyJan 4, 2012
  8. Dirk SüsserottJan 1, 2012
  9. Neal KreitzingerJan 5, 2012
  10. nn6eumtrJan 7, 2012
  11. Thomas RastJan 7, 2012
  12. Neal KreitzingerJan 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.