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

Re: [PATCH 0/9] remerge diff proof of concept/RFC

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 4, 2014, 23:04 UTC
Message-ID
<xmqq1tzi7a4c.fsf@gitster.dls.corp.google.com>
In-Reply-To
<cover.1391549294.git.tr@thomasrast.ch>
Thomas Rast <tr@thomasrast.ch> writes:
>   log --remerge-diff: show what the conflict resolution changed
Yay ;-)
Show 5 quoted lines
> This series explores another angle, which I call "remerge diff".  It
> works by re-doing the merge in core, using features from patches 1-3
> and 7.  Likely that will result in conflicts, which are formatted in
> the usual <<<<<<< way.  Then it diffs this "remerge" against the
> merge's tree that is recorded in history.

Yup, that is the obvious way to recreate what would have been shown to the person who recorded the merge result. I like that approach.

Show 5 quoted lines
> So I would welcome comments, and/or better ideas, on the following
> proposed resolution:
>
> * Implement what I described last, to take care of delete/modify
>   conflicts.
Naively, I would have thought that
 - If the recorded result of the merge does not have the path, then
   show the deletion of the contents relative to the side that
   modified it.
 - If the recorded result of the merge has the path, then show the
   change between the side that modified it and the recorded result.

might be more useful. Then we will know what we lost in full (if the recorded result is to "delete" it), but it is very likely that we won't see anything if the recorded result blindly took what the modifying side left. Comparing with the synthetic stages 2+3 will at least show us there was something funky going on, so your approach would be reasonable in this case.

> * Punt on more complex conflicts, by removing those files from the
>   index, and emitting a warning about those files instead.
Sensible.
Previous: Thomas Rast
Message 11 of 11 in “remerge diff proof of concept/RFC”
  1. 0/9 remerge diff proof of concept/RFCThomas Rast, Feb 4, 2014
  2. 1/9 merge-recursive: remove dead conditional in update_stages()Thomas Rast, Feb 4, 2014
  3. 2/9 merge-recursive: internal flag to avoid touching the worktreeThomas Rast, Feb 4, 2014
  4. 3/9 merge-recursive: -Xindex-only to leave worktree unchangedThomas Rast, Feb 4, 2014
  5. 4/9 pretty: refactor add_merge_info() into partsThomas Rast, Feb 4, 2014
  6. 5/9 log: add a merge base inspection optionThomas Rast, Feb 4, 2014
  7. 6/9 combine-diff: do not pass revs->dense_combined_merges redundantlyThomas Rast, Feb 4, 2014
  8. 7/9 Fold all merge diff variants into an enumThomas Rast, Feb 4, 2014
  9. 8/9 merge-recursive: allow storing conflict hunks in indexThomas Rast, Feb 4, 2014
  10. 9/9 log --remerge-diff: show what the conflict resolution changedThomas Rast, Feb 4, 2014
  11. Junio C HamanoFeb 4, 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.