aboutsummaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-14 14:54:50 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-14 14:54:50 -0700
commit0b2c4bc3ff6504467d84cb1bf6e73d877b553ce6 (patch)
tree72771f2d9c9e8f3a971cd6ca36e45441f9df04aa /apply.c
parent505312a83f642da0a7d03ebf56dc145890c58743 (diff)
parente95d515141648e4067dbda8af8516e1c718c8f65 (diff)
downloadgit-0b2c4bc3ff6504467d84cb1bf6e73d877b553ce6.tar.xz
Merge branch 'jk/apply-patch-mode-check-fix'
The patch parser in 'git apply' has been a bit more lenient against unexpected mode bits, like 100664, recorded on extended header lines. * jk/apply-patch-mode-check-fix: 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;
}