From: Fredrik Kuivinen Date: Mon, 12 Sep 2005 21:08:13 GMT Subject: Re: [RFH] Merge driver Message-ID: <20050912210813.GA6644@c165.ib.student.liu.se> In-Reply-To: <7v3boen0rb.fsf_-_@assigned-by-dhcp.cox.net> On Fri, Sep 09, 2005 at 12:44:40AM -0700, Junio C Hamano wrote: ... > *1* Fredrik, I have been wondering if we can just say that lack > of '-u' flag implies '-i'. Is there a good reason that > 'git-read-tree -m O A B' without '-u' should care if working > tree is up to date for the paths involved? No, I don't think so. But it would be nice if one could use '-i' together with '-u'. The current git-merge-fredrik.py does not use '-i' together with '-u', but I plan to change that. Currently we assume that the index is uptodate when we start the merge. If the two branches have more than one common ancestor those ancestors are merged into a temporary tree, lets call it T, without touching the working directory. The final steps of the merge are currently the following steps (lets say we want to merge A with B): git-read-tree A git-update-cache --refresh git-read-tree -u -m T A B We need the second step because otherwise git-read-tree will complain that the cache isn't uptodate. But we _know_ that the contents are uptodate, so the second step is unnecessary and just eats time. So, instead of doing the above we should be able to do: git-read-tree A git-read-tree -u -i -m T A B I have a patch which implements this and it _seems_ to work fine. Is it reasonable to things this way or have I missed something? - Fredrik