{"thread":{"id":"430","subject":"[PATCH] typo fixes to git-apply-patch-script","startedAt":"2005-05-02T03:19:41Z","lastAt":"2005-05-02T03:19:41Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2353","messageId":"7vvf62pb5e.fsf@assigned-by-dhcp.cox.net","threadId":"430","inReplyTo":null,"subject":"[PATCH] typo fixes to git-apply-patch-script","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-02T03:19:41Z","receivedAt":"2005-05-02T03:19:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When git-apply-patch-script creates a new file without\nexecutable mode set, a typo caused it not to report that\nactivity to the user.  Also it was mistakenly running\ngit-update-cache twice for newly created or deleted paths.  This\npatch fixes these problems.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n****************************************************************\nLinus, please do not forget to make this script EXECUTABLE this\ntime.\n****************************************************************\n\njit-diff linus-mirror: git-apply-patch-script\n# - Fix missing '\\n' at end of git-cat-file -t output.\n# + working-tree\nMode changed: git-apply-patch-script (100644->100755)\n\n--- k/git-apply-patch-script\n+++ l/git-apply-patch-script\n@@ -31,7 +31,7 @@ test -f \"$name.rej\" || {\n \t    echo >&2 \"created $name with mode +x.\"\n \t    chmod \"$mode2\" \"$name\"\n \t    ;;\n-\t-)\n+\t-x)\n \t    echo >&2 \"created $name.\"\n \t    ;;\n \tesac\n@@ -52,9 +52,7 @@ test -f \"$name.rej\" || {\n \t    chmod \"$mode2\" \"$name\"\n \t    ;;\n \tesac\n+\tgit-update-cache -- \"$name\"\n     esac\n-    # This bit is debatable---the SCM may not want to keep\n-    # cache in sync with the work tree (JIT does want to).\n-    git-update-cache -- \"$name\"\n }\n exit 0\n\n"}]}