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

Re: Lost file after git merge

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2022, 22:04 UTC
Message-ID
<xmqqh72z4lu6.fsf@gitster.g>
In-Reply-To
<701c318c-1a1b-1793-90e8-807cf97dc948@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 12 quoted lines
>> Three-way merge between X and Y is all about taking what X did if Y
>> didn't have any opinion on what X touched.  This is exactly that
>> case.  The history 0--->3 didn't have any opinion on what should be
>> in P or whether P should exist, and that is why there is no change
>> between these two endpoints.
>
> The last sentence is not necessarily true.  You could also say that
> 0--->3 cared so much about path P having content A that it brought it
> back from the void.  Determining whether a de-facto revert
> - intended to return to an uncaring state of "take whatever main has" or
> - meant to choose *that* specific content which incidentally is on main
> is not possible from the snapshots at the merge point alone, I think.

Yes, it is doable. It no longer is a three-way merge if we did so, though ;-)

Previous: René ScharfeNext: Elijah Newren
Message 5 of 9 in “Lost file after git merge”
  1. Laďa TesaříkJul 28, 2022
  2. Ævar Arnfjörð BjarmasonJul 28, 2022
  3. Junio C HamanoJul 28, 2022
  4. René ScharfeJul 29, 2022
  5. Junio C HamanoJul 29, 2022
  6. Elijah NewrenJul 30, 2022
  7. René ScharfeJul 30, 2022
  8. Elijah NewrenJul 31, 2022
  9. brian m. carlsonJul 28, 2022

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.