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

Re: A git-mv question

From
RGRon Garret <ron1@flownet.com>
Date
Feb 2, 2010, 07:21 UTC
Message-ID
<ron1-C9CA44.23215801022010@news.gmane.org>
In-Reply-To
<alpine.LFD.2.00.1002011927490.1681@xanadu.home>
In article <alpine.LFD.2.00.1002011927490.1681@xanadu.home>,
 Nicolas Pitre <nico@fluxnic.net> wrote:
Show 15 quoted lines
> On Mon, 1 Feb 2010, Ron Garret wrote:
> 
> > If I do a git-mv *and* edit the file all in one commit, does that get 
> > recorded in a way that allows git to track the change through the 
> > changed file name?  In other words, if I do just a git-mv (without 
> > changing the file) git can track that by observing that two differently 
> > named objects in two different commit trees contain the same blob.  But 
> > if the file is edited then the blobs will be different.  Is git smart 
> > enough to distinguish a git-mv and edit from, say, the equivalent git-rm 
> > and git-add?  If so, how does it do it?
> 
> Please see:
> 
> http://www.kernel.org/pub/software/scm/git/docs/gitdiffcore.html
> 
Thanks!  A little light reading :-)
rg
Previous: Junio C HamanoNext: Jakub Narebski
Message 4 of 5 in “A git-mv question”
  1. Ron GarretFeb 2, 2010
  2. Nicolas PitreFeb 2, 2010
  3. Junio C HamanoFeb 2, 2010
  4. Ron GarretFeb 2, 2010
  5. Jakub NarebskiFeb 2, 2010

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.