Dear diary, on Fri, Apr 15, 2005 at 01:39:06AM CEST, I got a letter where Martin Schlemmer <[EMAIL PROTECTED]> told me that... > On Fri, 2005-04-15 at 01:15 +0200, Petr Baudis wrote: > > Dear diary, on Fri, Apr 15, 2005 at 01:04:50AM CEST, I got a letter > > where Martin Schlemmer <[EMAIL PROTECTED]> told me that... > > > Rather use checkout-cache to sync our tree, as should do the right thing > > > instead of diffing (cancel imply just blow away everything). > > > > > > Signed-off-by: Martin Schlemmer <[EMAIL PROTECTED]> > > > > > > gitcancel.sh: 839b3c58f20f6eb8412f499a891e007e2e67d114 > > > --- 839b3c58f20f6eb8412f499a891e007e2e67d114/gitcancel.sh > > > +++ uncommitted/gitcancel.sh > > > @@ -10,9 +10,8 @@ > > > # > > > # Takes no arguments. Takes the evil changes from the tree. > > > > > > -# FIXME: Does not revert mode changes! > > > > > > -show-diff | patch -p0 -R > > > rm -f .git/add-queue .git/rm-queue > > > +checkout-cache -q -f -a > > > > > > update-cache --refresh > > > > PS, shouldn't we add a read-tree $(tree-id) before the checkout-cache?
A correct tree should be in the index. And if for any completely weird and smelly reason it isn't, I'm pondering if we should back that out and always reread-tree (takes some time, but do you do git cancel all the time?), or rather comply to it and adjust to the loaded tree, whichever it is. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html