aboutsummaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-09-12 11:02:15 -0700
committerJunio C Hamano <gitster@pobox.com>2024-09-12 11:02:15 -0700
commit712d970c0145b95ce655773e7cd1676f09dfd215 (patch)
tree52a776c2cb60594aa82a14156667eca3bf10fffb /apply.c
parentA bit more topics for 2.46.x maintenance track (diff)
parentt4129: fix racy index when calling chmod after git-add (diff)
downloadgit-712d970c0145b95ce655773e7cd1676f09dfd215.tar.gz
git-712d970c0145b95ce655773e7cd1676f09dfd215.zip
Merge branch 'jk/apply-patch-mode-check-fix' into maint-2.46
Test fix. * jk/apply-patch-mode-check-fix: t4129: fix racy index when calling chmod after git-add apply: canonicalize modes read from patches
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index 0f2f5dabe3..6e1060a952 100644
--- a/apply.c
+++ b/apply.c
@@ -995,6 +995,7 @@ static int parse_mode_line(const char *line, int linenr, unsigned int *mode)
*mode = strtoul(line, &end, 8);
if (end == line || !isspace(*end))
return error(_("invalid mode on line %d: %s"), linenr, line);
+ *mode = canon_mode(*mode);
return 0;
}