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.