Skip to content

Commit 7fa76ee

Browse files
Junio C HamanoLinus Torvalds
authored andcommitted
[PATCH] typo fixes to git-apply-patch-script
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> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent dfcb405 commit 7fa76ee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

git-apply-patch-script

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test -f "$name.rej" || {
3131
echo >&2 "created $name with mode +x."
3232
chmod "$mode2" "$name"
3333
;;
34-
-)
34+
-x)
3535
echo >&2 "created $name."
3636
;;
3737
esac
@@ -52,9 +52,7 @@ test -f "$name.rej" || {
5252
chmod "$mode2" "$name"
5353
;;
5454
esac
55+
git-update-cache -- "$name"
5556
esac
56-
# This bit is debatable---the SCM may not want to keep
57-
# cache in sync with the work tree (JIT does want to).
58-
git-update-cache -- "$name"
5957
}
6058
exit 0

0 commit comments

Comments
 (0)