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

[buglet] misleading error message from git checkout

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
May 16, 2009, 10:25 UTC
Message-ID
<20090516192531.6117@nanako3.lavabit.com>
When you aren't on any branch, have changes in your working files, and try to switch to another branch, you get an error message like this:
 % git checkout another
 Previous HEAD position was 0beee4c... git-add--interactive: remove hunk coalescing
 error: You have local changes to 'git-add--interactive.perl'; cannot switch branches.
Because the first line says "Previous ... was", I was mislead to believe that I sucsessfully switched branches, but I was mistaken.
If git-checkout were still a shell script probably I would have looked into fixing this myself, but now it is rewritten in C... Can somebody fix this please?
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Next: Daniel Cordero
Message 1 of 4 in “[buglet] misleading error message from git checkout”
  1. Nanako ShiraishiMay 16, 2009
  2. builtin-checkout: Don't tell user that HEAD has moved before it hasDaniel Cordero, May 16, 2009
  3. Junio C HamanoMay 16, 2009
  4. test: checkout shouldn't say that HEAD has moved if it didn'tNanako Shiraishi, May 17, 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.