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

Re: Merge without marking conflicts in working tree

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 17, 2014, 23:19 UTC
Message-ID
<xmqqzjbpwh35.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20141117223836.GH615@pug.qqx.org>
Aaron Schrab <aaron@schrab.com> writes:
> Is there a way to do a merge but only record conflicts in the index,
> not update the working versions of files with conflict markers?

Not with Porcelain, but "read-tree -m <ancestor> <ours> <theirs>" should give you something close to it.

"merge-recursive" is probably beyond salvaging and coaxing --cached option (i.e. tell a command that usually works both on the index and on the working tree to only work on the index) into it would be too messy to think about. Restructuring it so that it first computes the end result only in the index and then optionally allows it to check out to the working tree has been something I've wanted to do for a long time, but there is only limited amount of time in a day and the list is never dormant, so... X-<.

Previous: Aaron SchrabNext: Andreas Schwab
Message 2 of 3 in “Merge without marking conflicts in working tree”
  1. Aaron SchrabNov 17, 2014
  2. Junio C HamanoNov 17, 2014
  3. Andreas SchwabNov 17, 2014

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.