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

Re: maildir / read-tree trivial merging getting in the way?

From
Junio C Hamano <junkio@cox.net>
Date
Feb 14, 2006, 02:28 UTC
Message-ID
<7vy80ewu6n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.60.0602140217380.19093@mundungus.clifford.ac>
Ben Clifford <benc@hawaga.org.uk> writes:
> So basically my question is: should I feel dirty about doing this and
> diddle read-tree so that there's a flag to not do the trivial merges
> automatically?

I am mildly negative about touching read-tree for this kind of non-SCM'ish usage.

If you are doing read-tree without doing any trivial merge, then you would use ls-files to inspect each stage, decide what the final shape of the tree you want, and construct such a tree in the index.

That would be more naturally done by writing that thing in a more reasonable scripting language (not shell, but Perl or Python), call ls-tree three times, do whatever merge to come up with the final shape of the tree, and then construct the tree with a single invocation of "update-index --index-info", maybe even starting from an empty index file.

Previous: Ben CliffordNext: Ben Clifford
Message 2 of 5 in “maildir / read-tree trivial merging getting in the way?”
  1. Ben CliffordFeb 14, 2006
  2. Junio C HamanoFeb 14, 2006
  3. Ben CliffordFeb 14, 2006
  4. Linus TorvaldsFeb 14, 2006
  5. Linus TorvaldsFeb 14, 2006

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.