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

[PATCH] typo fixes to git-apply-patch-script

From
Junio C Hamano <junkio@cox.net>
Date
May 2, 2005, 03:19 UTC
Message-ID
<7vvf62pb5e.fsf@assigned-by-dhcp.cox.net>

When git-apply-patch-script creates a new file without executable mode set, a typo caused it not to report that activity to the user. Also it was mistakenly running git-update-cache twice for newly created or deleted paths. This patch fixes these problems.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

**************************************************************** Linus, please do not forget to make this script EXECUTABLE this time. ****************************************************************

jit-diff linus-mirror: git-apply-patch-script # - Fix missing '\n' at end of git-cat-file -t output. # + working-tree Mode changed: git-apply-patch-script (100644->100755)

--- k/git-apply-patch-script +++ l/git-apply-patch-script

@@ -31,7 +31,7 @@ test -f "$name.rej" || {
 	    echo >&2 "created $name with mode +x."
 	    chmod "$mode2" "$name"
 	    ;;
-	-)
+	-x)
 	    echo >&2 "created $name."
 	    ;;
 	esac
@@ -52,9 +52,7 @@ test -f "$name.rej" || {
 	    chmod "$mode2" "$name"
 	    ;;
 	esac
+	git-update-cache -- "$name"
     esac
-    # This bit is debatable---the SCM may not want to keep
-    # cache in sync with the work tree (JIT does want to).
-    git-update-cache -- "$name"
 }
 exit 0
Message 1 of 1 in “typo fixes to git-apply-patch-script”
  1. typo fixes to git-apply-patch-scriptJunio C Hamano, May 2, 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.