[patch pasky] update gitcancel.sh to handle modes as well

From: Martin Schlemmer <azarah@nosferatu.za.org>
Date: 2005-04-15 08:57:25
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 <azarah@nosferatu.za.org>

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)


-- 
Martin Schlemmer




-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Fri Apr 15 08:55:20 2005

This archive was generated by hypermail 2.1.8 : 2005-04-15 11:38:20 EST