author | Linus Torvalds <torvalds@linux-foundation.org> | |
Sat, 14 Jun 2008 18:43:01 +0000 (11:43 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 14 Jun 2008 21:39:22 +0000 (14:39 -0700) | ||
commit | c529d75a75adf943f53dd20b8cf3e37438b4e750 | |
tree | c5da8ecb645847360f48a92992723b9ce76e4ef9 | tree | snapshot |
parent | 44d1c19ee8ab405108b90ab9c02cd86a014639e8 | commit | diff |
Simplify and rename find_sha1_file()
Now that we've made the loose SHA1 file reading more careful and
streamlined, we only use the old find_sha1_file() function for checking
whether a loose object file exists at all.
As such, the whole 'return stat information' part of it was just
pointless (nobody cares any more), and the naming of the function is not
really all that relevant either.
So simplify it to not do a 'stat()', but just an existence check (which
is what the callers want), and rename it to 'has_loose_object()' which
matches the use.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now that we've made the loose SHA1 file reading more careful and
streamlined, we only use the old find_sha1_file() function for checking
whether a loose object file exists at all.
As such, the whole 'return stat information' part of it was just
pointless (nobody cares any more), and the naming of the function is not
really all that relevant either.
So simplify it to not do a 'stat()', but just an existence check (which
is what the callers want), and rename it to 'has_loose_object()' which
matches the use.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c | diff | blob | history |