On Fri, 2005-04-15 at 00:57 +0200, Martin Schlemmer wrote: > Hi, > > gitcancel.sh do not handle mode changes: > > ---- > $ chmod -x Makefile > $ git cancel > patch: **** Only garbage was found in the patch input. > ---- > > 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]> > > gittrack.sh: 03d6db1fb3a70605ef249c632c04e542457f0808 > --- 03d6db1fb3a70605ef249c632c04e542457f0808/gittrack.sh > +++ uncommitted/gittrack.sh > @@ -51,6 +51,7 @@ > > read-tree $(tree-id "$name") > gitdiff.sh local "$name" | gitapply.sh > + update-cache --refresh > > else > [ "$tracking" ] || \ > @@ -61,6 +62,7 @@ > if [ -s ".git/HEAD.local" ]; then > gitdiff.sh "$tracking" local | gitapply.sh > read-tree $(tree-id local) > + update-cache --refresh > > head=$(cat .git/HEAD) > branchhead=$(cat .git/heads/$tracking)
Yes, I am an idiot, and its past 1am already here. 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 -- Martin Schlemmer
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
signature.asc
Description: This is a digitally signed message part