mirror of
https://github.com/git/git.git
synced 2025-03-15 22:31:10 +00:00
reachable.c::add_one_tree: handle NULL from lookup_tree
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c1ee9013ad
commit
c34066358a
@ -150,7 +150,8 @@ static int add_one_reflog(const char *path, const unsigned char *sha1, int flag,
|
||||
static void add_one_tree(const unsigned char *sha1, struct rev_info *revs)
|
||||
{
|
||||
struct tree *tree = lookup_tree(sha1);
|
||||
add_pending_object(revs, &tree->object, "");
|
||||
if (tree)
|
||||
add_pending_object(revs, &tree->object, "");
|
||||
}
|
||||
|
||||
static void add_cache_tree(struct cache_tree *it, struct rev_info *revs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user