summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index e158be5..8cb768e 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;
}
@@ -262,6 +269,7 @@ struct commit_list *get_shallow_commits_by_rev_list(int ac, const char **av,
if ((o->flags & both_flags) == both_flags)
o->flags &= ~not_shallow_flag;
}
+ release_revisions(&revs);
return result;
}
@@ -560,7 +568,7 @@ static void paint_down(struct paint_info *info, const struct object_id *oid,
else
c->object.flags |= SEEN;
- if (*refs == NULL)
+ if (!*refs)
*refs = bitmap;
else {
memcpy(tmp, *refs, bitmap_size);