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

Re: Bug! Git merge also fails with a wrong error message

From
Jeff King <peff@peff.net>
Date
Jan 13, 2012, 18:54 UTC
Message-ID
<20120113185436.GA13522@sigill.intra.peff.net>
In-Reply-To
<4F107CAD.1020103@unclassified.de>
On Fri, Jan 13, 2012 at 07:49:17PM +0100, Yves Goergen wrote:
Show 6 quoted lines
> On 13.01.2012 18:50 CE(S)T, Jeff King wrote:
> > Whether a file in the working tree is tracked or not does not have to do
> > with the history, but rather with whether it is mentioned in the index.
> 
> I'm not using the index. In fact I don't even know how that what I have
> read about it can be useful.

Whether you realize it or not, git is using the index to store state. When you "git add", "git rm", or "git mv", it is updating the index.

> > Does the file appear in "git ls-files"?
> 
> Yes, it's in the list along with all other files.
Then it should be considered tracked, and there's a bug.

I notice that in your first mail, you mentioned a problem with "checkout", and in the second one, a problem with "merge". Do you still have the repo around with the "checkout" problem? If so, is the file also in your "git ls-files" output in that repo?

It is much more likely to me that there is a bug in the merge than in regular checkout (because merge has many complex corner cases surrounding the 3-way merge, whereas checkout is simply moving from one state to another). I'd like to make sure we're not seeing two different problems.

Show 6 quoted lines
> Here's the git status output:
> # On branch master
> nothing to commit (working directory clean)
> 
> I have switched to master and the very next action was trying the merge.
> There's no change in the working directory, and nothing uncommitted.

Which version of git are you using? There were many bugs fixed around this area of merge around the v1.7.7 timeframe.

-Peff
Previous: Yves GoergenNext: Yves Goergen
Message 18 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.