]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
refs: fix find_containing_dir() regression
authorJunio C Hamano <gitster@pobox.com>
Thu, 3 May 2012 22:12:54 +0000 (15:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 May 2012 16:17:50 +0000 (09:17 -0700)
commit663c1295d8a6a591a805692d311e1d709e3193e2
treefcd7e0bfbdbf381c7c6d74f7dfad440dd017376b
parent28e6a34e254a1ee5fc3d106e4a6117fd02254589
refs: fix find_containing_dir() regression

The function used to return NULL when asked to find the containing
directory for a ref that does not exist, allowing the caller to
omit iteration altogether. But a misconversion in an earlier change
"refs.c: extract function search_for_subdir()" started returning the
top-level directory entry, forcing callers to walk everything.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c