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

Re: Bug? Git checkout fails with a wrong error message

From
YGYves Goergen <nospam.list@unclassified.de>
Date
Jan 17, 2012, 17:56 UTC
Message-ID
<4F15B65A.8070009@unclassified.de>
In-Reply-To
<87ipkaogyj.fsf@thomas.inf.ethz.ch>
On 17.01.2012 09:45 CE(S)T, Thomas Rast wrote:
Show 7 quoted lines
> It would also be interesting to know for how long this problem has
> existed.  You can search for the offending commit with something like
> 
>   git log --name-status --diff-filter=A -- "PosterWantsItCensored.*"
> 
> which should normally give you just one or two commits, namely the
> one(s) that introduced the two files.

I have found two commits adding that file. The second one has the file with the then-already-present name modified and the new spelling added. I could have noticed that at commit time, but that's the very commit where I also renamed the original files and recreated them in the Forms designer. 1) This may have led me to overlook that additional add and 2) this may be the source of the spelling difference because the file was newly created.

> As for the fix, there are two-and-two-thirds cases. (...)

That all sounds quite complicated. The "offending" commit is quite a while back so replacing the last commit is not a solution.

This is just my personal repository that should help me out with finding changes when I find something broken that wasn't before. Deleting and recreating the "hub" (bare) and the other working repository would be okay for me in this case. I have decided that it is also okay to fix the error by new commits. To avoid all further issues with this, I have renamed the file, committed the deletion, renamed it back and then committed the add. The revsion in between won't compile, but it's got a message with it and the compiler error would be obvious.

Show 5 quoted lines
> You should really read up on this, e.g.
> 
>   http://tomayko.com/writings/the-thing-about-git
> 
> AFAIK everyone who groks the feature uses it daily.

It's on my to-read list. Looks like an interesting article from reading the beginning of it.

I have done a test, too: I have set the core.ignorecase setting to false (or deleted its entry) and then renamed one of the files in my working directory only in case. TortoiseGit has offered me adding the new spelling for a commit. After setting the core.ignorecase setting to true, it has not offered any change to commit anymore. So it looks like this is just the setting that every repository for Windows use should - no - must have, and it was missing here.

Just like that stupid autocrlf that causes more issues than it solves. I regularly see files with all lines changed and the diff says that both files only differ in line endings. But I have no sure observation on whether that value was set or unset in those cases. I'll have to look after that, too.

These two config settings are not cloned with the repository, are they?

Also, TortoiseGit already sets ignorecase = true. So maybe the Visual Studio provider does the init on its own and is missing that. Or I have at some time cloned the repository and the setting wasn't copied over.

-- 
Yves Goergen "LonelyPixel" <nospam.list@unclassified.de>
Visit my web laboratory at http://beta.unclassified.de
Previous: Thomas RastNext: Thomas Rast
Message 26 of 27 in “Bug? Git checkout fails with a wrong error message”
  1. Yves GoergenJan 12, 2012
  2. Holger HellmuthJan 13, 2012
  3. Yves GoergenJan 13, 2012
  4. Holger HellmuthJan 13, 2012
  5. Yves GoergenJan 15, 2012
  6. Holger HellmuthJan 16, 2012
  7. Yves GoergenJan 16, 2012
  8. Jeff KingJan 16, 2012
  9. Yves GoergenJan 16, 2012
  10. Jeff KingJan 16, 2012
  11. Yves GoergenJan 17, 2012
  12. Thomas RastJan 16, 2012
  13. Erik Faye-LundJan 16, 2012
  14. Yves GoergenJan 16, 2012
  15. Bug! Git merge also fails with a wrong error messageYves Goergen, Jan 13, 2012
  16. Jeff KingJan 13, 2012
  17. Yves GoergenJan 13, 2012
  18. Jeff KingJan 13, 2012
  19. Yves GoergenJan 13, 2012
  20. Carlos Martín NietoJan 13, 2012
  21. Yves GoergenJan 13, 2012
  22. Jakub NarebskiJan 13, 2012
  23. Yves GoergenJan 15, 2012
  24. Jakub NarebskiJan 15, 2012
  25. Thomas RastJan 17, 2012
  26. Yves GoergenJan 17, 2012
  27. Thomas RastJan 19, 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.