git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
MSMartin Schlemmer <azarah@nosferatu.za.org>
Date
Apr 14, 2005, 22:57 UTC
Message-ID
<1113519445.23299.119.camel@nosferatu.lan>
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



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)
Next: Petr Baudis
Message 1 of 7 in “update gitcancel.sh to handle modes as well”
  1. update gitcancel.sh to handle modes as wellMartin Schlemmer, Apr 14, 2005
  2. Petr BaudisApr 14, 2005
  3. Martin SchlemmerApr 14, 2005
  4. Petr BaudisApr 14, 2005
  5. Martin SchlemmerApr 14, 2005
  6. Martin SchlemmerApr 14, 2005
  7. Petr BaudisApr 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.