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

Re: Merge with staged and unstaged changes

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 20, 2013, 22:17 UTC
Message-ID
<7vk3q2y6iy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<A54CE3E330039942B33B670D971F85740396C4F8@TK5EX14MBXC254.redmond.corp.microsoft.com>
Edward Thomson <ethomson@microsoft.com> writes:
Show 7 quoted lines
> I also appreciate your explanation of the affect of the workdir,
> and that makes sense.  I would have expected that the default was
> to presume the workdir files were existent, rather than the
> other way around, but we can agree that is an implementation detail.
>
> My biggest concern, of course, was having the unstaged files in my
> workdir overwritten or deleted.

Oh, no question about that part. You concluded your original message with:

>> I trust the last two cases, where data is lost, are bugs to
>> report, but could I get clarification on the other situations?
and I was responding to the part after the "but could I get...".

I am fairly familiar with the "read-tree -m -u O A B" three-way merge codepath (after all I designed that with Linus in the very early days of Git), but I am not as familar with the merge-recursive backend as merge-resolve, and I was hoping to see the "bug" part triaged by other people.

Previous: Edward Thomson
Message 4 of 4 in “Merge with staged and unstaged changes”
  1. Edward ThomsonFeb 20, 2013
  2. Junio C HamanoFeb 20, 2013
  3. Edward ThomsonFeb 20, 2013
  4. Junio C HamanoFeb 20, 2013

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.