summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-04-16 13:57:39 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 13:57:39 -0700
commit0f2303f71957ec68c92487f185435fbec6bd1c79 (patch)
treee022421aad3c90ef550eaa69b388df25ceb1686b /commit.c
parenteec8c633c117c83a9fd2be7054b169d3cee5806d (diff)
downloadgit-0f2303f71957ec68c92487f185435fbec6bd1c79.tar.gz
[PATCH] Un unoptimize ls-tree behaviour
ls-tree unconditionally called read_sha1_file() for all paths even when not needed, which was a mistake introduced by me. Rectify this by first checking S_ISDIR(mode) and read the tree contents only when it is a tree and we are recursive. There is no need to read it in any other cases. The patch also removes the confusing comment that led to this incorrect implementation. Thanks to Peter Baudis for noticing this problem. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions