summaryrefslogtreecommitdiff
path: root/builtin/merge-file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-10-27 11:18:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-10-27 11:24:01 -0700
commit5fb8c05f2e5da483898019f7abc0e52e07bc0c50 (patch)
tree72c2b4a42a428bdd78fcbdb00b9d21b1eda8e1a7 /builtin/merge-file.c
parenttree-walk.c: do not leak internal structure in tree_entry_len() (diff)
downloadtgif-5fb8c05f2e5da483898019f7abc0e52e07bc0c50.tar.xz
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 'builtin/merge-file.c')
0 files changed, 0 insertions, 0 deletions