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

Re: Cygwin: problem with renaming and case

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Mar 21, 2008, 18:57 UTC
Message-ID
<37fcd2780803211157n15cec620gb5ab1d3e57ccd37b@mail.gmail.com>
In-Reply-To
<47E3DD28.4030302@tiscali.it>
On Fri, Mar 21, 2008 at 7:07 PM, Frank <streamlake@tiscali.it> wrote:
Show 21 quoted lines
> Hi,
>  Don't know exactly if this is a bug or a feature or something in the
>  middle, but I have a lot of problems while changing just the casing of
>  file names and using git mv und cygwin. Here's a test case:
>
>  mkdir testrename
>  cd testrename
>  git init
>  echo "AAA" >aaa.txt
>  echo "BBB" >bbb.txt
>  git add aaa.txt
>  git add bbb.txt
>  git commit -m "First commit"
>  git checkout -b new_branch
>  git mv aaa.txt ccc.txt
>  git commit -a -m "Moved file"
>  echo "NEW AAA" >Aaa.txt
>  git add Aaa.txt
>  git commit -m "Added Aaa"
>  #aaa.txt exists in master, Aaa.txt in new_branch
>  git checkout master

I wonder do you really need to have two files on different branches whose name only differ by case, especially when you work on case insensitive filesystem? I suspect the answer is no. In this case, you can choose one policy for file naming and stick to it. For instance, that all names should be in low case except Makefile, or something like that. This policy can be enforced using pre-commit hook.

Dmitry
Previous: Steffen ProhaskaNext: streamlake@tiscali.it
Message 7 of 11 in “Cygwin: problem with renaming and case”
  1. FrankMar 21, 2008
  2. Linus TorvaldsMar 21, 2008
  3. Avery PennarunMar 21, 2008
  4. Linus TorvaldsMar 21, 2008
  5. Junio C HamanoMar 22, 2008
  6. Steffen ProhaskaMar 22, 2008
  7. Dmitry PotapovMar 21, 2008
  8. streamlake@tiscali.itMar 21, 2008
  9. Brian DessentMar 21, 2008
  10. Nagy BalázsMar 22, 2008
  11. Linus TorvaldsMar 22, 2008

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.