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

Re: [PATCH 0/3] merge -Xindex-only

From
Thomas Rast <tr@thomasrast.ch>
Date
Oct 26, 2013, 14:40 UTC
Message-ID
<87ob6cm6y1.fsf@linux-k42r.v.cablecom.net>
In-Reply-To
<87wqozbj0d.fsf@hexa.v.cablecom.net>
Thomas Rast <trast@inf.ethz.ch> writes:
Show 6 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
> On IRC you said you would like a version that always acts as
> --no-commit, and simply returns the conflict/no conflict bit as usual.
> The caller would then proceed using commit-tree itself.  I think that is
> probably a saner solution than this "output ref" idea.

I just had a huge facepalm moment. We already have this option. It is called git-merge-recursive.

That is,
  git merge-recursive $(git merge-base --all HEAD other) -- HEAD other

will internally do all the work that 'git merge other' would do, but not update any refs. With this series, you can therefore say

  git merge-recursive --index-only $(git merge-base --all HEAD other) -- HEAD other
and get an *index-only* merge of HEAD and other.

Can you see if this is enough to build git-imerge on top of it? Otherwise I'm glad to help with building the git-merge infrastucture to support it.

I'll send v2 of the series in a minute; the only change is that I changed the internal flag semantics as per Junio's comment in

  http://thread.gmane.org/gmane.comp.version-control.git/229787/focus=229797
-- 
Thomas Rast
tr@thomasrast.ch
Previous: Thomas RastNext: Thomas Rast
Message 12 of 15 in “merge -Xindex-only”
  1. 0/3 merge -Xindex-onlyThomas Rast, Jul 7, 2013
  2. 1/3 merge-recursive: remove dead conditional in update_stages()Thomas Rast, Jul 7, 2013
  3. 2/3 merge-recursive: untangle double meaning of o->call_depthThomas Rast, Jul 7, 2013
  4. Junio C HamanoJul 7, 2013
  5. 3/3 merge-recursive: -Xindex-only to leave worktree unchangedThomas Rast, Jul 7, 2013
  6. Michael HaggertyJul 8, 2013
  7. Thomas RastJul 8, 2013
  8. Michael HaggertyJul 9, 2013
  9. Thomas RastJul 9, 2013
  10. Michael HaggertyJul 9, 2013
  11. Thomas RastJul 9, 2013
  12. Thomas RastOct 26, 2013
  13. 1/3 merge-recursive: remove dead conditional in update_stages()Thomas Rast, Oct 26, 2013
  14. 2/3 merge-recursive: internal flag to avoid touching the worktreeThomas Rast, Oct 26, 2013
  15. 3/3 merge-recursive: -Xindex-only to leave worktree unchangedThomas Rast, Oct 26, 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.