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

[BUG] merge into unborn branch resets index+WT even if populated

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 17, 2010, 07:45 UTC
Message-ID
<201008170945.31850.trast@student.ethz.ch>
Hi,

I'm posting this on behalf of Dscho who reported it on IRC, but apparently doesn't have the time for email.

If you run the following sequence of commands:
  git init
  echo foo > somefile
  git add somefile
  git pull elsewhere master

(where 'elsewhere' is any repo having a master branch) the "merge into unborn branch" logic silently nukes the index AND worktree copy of "somefile", thereby losing it. The same works with fetch+merge, so it's not pull's fault.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Next: Thomas Rast
Message 1 of 2 in “[BUG] merge into unborn branch resets index+WT even if populated”
  1. Thomas RastAug 17, 2010
  2. Exhibit merge bug that clobbers index&WTThomas Rast, Aug 22, 2010

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.