summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--builtin/apply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index a1db7b4295..1f78e2cfab 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3606,7 +3606,11 @@ static void build_fake_ancestor(struct patch *list, const char *filename)
if (0 < patch->is_new)
continue;
- if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {
+ if (S_ISGITLINK(patch->old_mode)) {
+ if (get_sha1_hex(patch->old_sha1_prefix, sha1))
+ die("submoule change for %s without full index name",
+ name);
+ } else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {
; /* ok */
} else if (!patch->lines_added && !patch->lines_deleted) {
/* mode-only change: update the current */