Re: [PATCH] cogito: Avoid slowness when timewarping large trees.
- From
Jeff King <peff@peff.net>
- Date
- Mar 24, 2006, 10:55 UTC
- Message-ID
- <20060324105543.GA2543@coredump.intra.peff.net>
- In-Reply-To
- <7vd5gc16u2.fsf@assigned-by-dhcp.cox.net>
On Fri, Mar 24, 2006 at 02:21:25AM -0800, Junio C Hamano wrote:
> Metainformation fields are internally separated with SP and a > TAB comes before pathname; you can just say: > > sed -ne 's/^:[^ ]* D //p'
That is much cleaner (I stupidly just converted the original regex verbatim).
> a SP). You might also want to consider "xargs rm -f --", BTW.
Oops, you're right. In particular, rm complains when there are no deletions.
Show 9 quoted lines
> However, I wonder why it does not do this instead: > > ... stash away the local changes > git-read-tree -m "$base" ;# reset the index to $base > > # switch to $branch -- removing gone files as well > git-read-tree -m -u "$base" "$branch" > > Then you can also lose diff-tree and checkout-index there.
This doesn't deal very well with local changes. The second read-tree complains about a not uptodate entry during the merge. Since we've already stashed the local changes as a diff, we should be able to simply ignore them during the read-tree. Should the first read-tree actually be: git-read-tree --reset "$base" ?
-Peff