aboutsummaryrefslogtreecommitdiffstats
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-13 15:53:42 -0700
committerJunio C Hamano <gitster@pobox.com>2022-06-13 15:53:42 -0700
commiteef985e17af956b341b08ed7ad47f3941cb7da94 (patch)
tree64a39f19d76af42abc04114a621a3a17fac26b5f /shallow.c
parentMerge branch 'ab/hooks-regression-fix' (diff)
parentcommit,shallow: unparse commits if grafts changed (diff)
downloadgit-eef985e17af956b341b08ed7ad47f3941cb7da94.tar.gz
git-eef985e17af956b341b08ed7ad47f3941cb7da94.zip
Merge branch 'jt/unparse-commit-upon-graft-change'
Updating the graft information invalidates the list of parents of in-core commit objects that used to be in the graft file. * jt/unparse-commit-upon-graft-change: commit,shallow: unparse commits if grafts changed
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shallow.c b/shallow.c
index 4270471586..8cb768ee5f 100644
--- a/shallow.c
+++ b/shallow.c
@@ -97,6 +97,13 @@ int commit_shallow_file(struct repository *r, struct shallow_lock *lk)
{
int res = commit_lock_file(&lk->lock);
reset_repository_shallow(r);
+
+ /*
+ * Update in-memory data structures with the new shallow information,
+ * including unparsing all commits that now have grafts.
+ */
+ is_repository_shallow(r);
+
return res;
}