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

Re: Bug: Git rename does not work if folder naming was changed from lower to upper case on OSX

From
Kevin Daudt <me@ikke.info>
Date
Apr 29, 2017, 20:18 UTC
Message-ID
<20170429201813.GA19256@alpha.vpn.ikke.info>
In-Reply-To
<10d4f73b-b4bd-4cf8-5727-cdaf10ab713a@xarg.org>
On Sat, Apr 29, 2017 at 12:47:13PM +0200, Robert Eisele wrote:
Show 14 quoted lines
> Hi,
> 
> after having committed folders with lower case naming, I decided to rename
> them to upper-case names. Expecting git to detect them as renamings, it
> started a new parallel hierarchy with new files, which I had to add/commit.
> 
> It was a kinda strange behavior, which I fixed by rename the folder to
> something completely different, commit and rename the folder again to the
> desired value.
> 
> Is this an actual desired behavior or is it a bug?
> 
> Robert
> 

Note that git does not store that files are renamed. So a remove + add is the same as a rename in git. Only git status shows it when you for example use git mv directly, but this information is lost on commit. Instead of storing it get relies on detecting what (parts of ) files got renamed, copied etc.

Previous: Torsten BögershausenNext: Junio C Hamano
Message 3 of 5 in “Bug: Git rename does not work if folder naming was changed from lower to upper case on OSX”
  1. Robert EiseleApr 29, 2017
  2. Torsten BögershausenApr 29, 2017
  3. Kevin DaudtApr 29, 2017
  4. Junio C HamanoMay 1, 2017
  5. Kevin DaudtMay 1, 2017

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.