aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-09 14:00:44 -0700
committerJunio C Hamano <gitster@pobox.com>2020-07-09 14:00:44 -0700
commit24ecfdf206ee0e9e01f86d333d90d281fdfd12d0 (patch)
treecebd8275c93f7a86afa85fb6ed69fe0691034f3f /commit.c
parent46be023084bd6ce4958f16427da7cdaf91cff205 (diff)
parentce16364e897e70a17bd1864b6007719eeec959f3 (diff)
downloadgit-24ecfdf206ee0e9e01f86d333d90d281fdfd12d0.tar.gz
Merge branch 'tb/fix-persistent-shallow' into master
When "fetch.writeCommitGraph" configuration is set in a shallow repository and a fetch moves the shallow boundary, we wrote out broken commit-graph files that do not match the reality, which has been corrected. * tb/fix-persistent-shallow: commit.c: don't persist substituted parents when unshallowing
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index 43d29a800d..7128895c3a 100644
--- a/commit.c
+++ b/commit.c
@@ -423,6 +423,8 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b
pptr = &item->parents;
graft = lookup_commit_graft(r, &item->object.oid);
+ if (graft)
+ r->parsed_objects->substituted_parent = 1;
while (bufptr + parent_entry_len < tail && !memcmp(bufptr, "parent ", 7)) {
struct commit *new_parent;