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

Re: lineups with GIT (or dealing with directory renames)

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 23, 2009, 17:25 UTC
Message-ID
<m3mydix7bq.fsf@localhost.localdomain>
In-Reply-To
<1232610882661-2196604.post@n2.nabble.com>
outre <spoony.sob@hotmail.com> writes:
[...]
Show 11 quoted lines
> I tried using "git mv" command and it somewhat solved the problem. After I
> cloned the devel line-up, I used "git rm iWeb.local iWeb.test".
> And now if I edit a file in iWeb.local and do a pull to iWeb.test this file
> gets properly updated while preserving the difference between
> the folder names. But if I add a new file to iWeb.local, and then do a pull
> I get  iWeb.local folder added together with the 
> new file to the testing line-up.
> 
> I was wondering if it is intended behaviour for GIT. And if it is may be
> someone can point me to a better way to setup two line-ups using
> GIT.

I know nothing about line-ups, but the behaviour wrt. wholesame directory renames is _known_ behavior of git. If one side renames directory, and other side creates new files in old-name directory, the old-name directory gets recreated during merging.

I wrote _known_ and not _intendend_ because this can be changed; there were some patches on git mailing list (I don't know what happened to them; I think the development stalled) that added detecting wholesame rename of directories, based on heuristic content and filename similarity based detection of renames for individual files.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: outreNext: Daniel Barkalow
Message 2 of 3 in “lineups with GIT”
  1. outreJan 22, 2009
  2. Jakub NarebskiJan 23, 2009
  3. Daniel BarkalowJan 23, 2009

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.