summaryrefslogtreecommitdiff
path: root/list-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-27 18:18:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-27 18:24:01 (GMT)
commit5fb8c05f2e5da483898019f7abc0e52e07bc0c50 (patch)
tree72c2b4a42a428bdd78fcbdb00b9d21b1eda8e1a7 /list-objects.c
parent0de1633783685e9fb1943551217cdda7edbd245b (diff)
downloadgit-5fb8c05f2e5da483898019f7abc0e52e07bc0c50.zip
git-5fb8c05f2e5da483898019f7abc0e52e07bc0c50.tar.gz
git-5fb8c05f2e5da483898019f7abc0e52e07bc0c50.tar.bz2
get_tree_entry(): do not call find_tree_entry() on an empty tree
We know we will find nothing. This incidentally squelches false warning from gcc about potentially uninitialized usage of t.entry fields. For an empty tree, it is true that init_tree_desc() does not call decode_tree_entry() and the tree_desc is left uninitialized, but find_tree_entry() only calls tree_entry_extract() that uses the tree_desc while it has more things to read from the tree, so the uninitialized t.entry fields are never used in such a case anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.c')
0 files changed, 0 insertions, 0 deletions