author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 26 May 2007 05:25:11 +0000 (01:25 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 27 May 2007 03:28:08 +0000 (20:28 -0700) | ||
commit | 693d2bc625e7168299741d673e7205e9d2c969df | |
tree | fe9417cd44b38f1dce1ec98cafde335b9ba8e1ca | tree | snapshot |
parent | 7dc24aa5a62cc5f77e6637674581c837f4bdf78e | commit | diff |
Attempt to delay prepare_alt_odb during get_sha1
Not every input value passed to get_sha1 is an abbreviated SHA-1.
Its actually quite common for refs to be passed and for those
refs to resolve to full SHA-1s, in which case we may not need to
initialize the alternate object database list in this process.
I'm relocating the call to prepare_alt_odb closer to the code
that actually needs it to maintain the fix first introduced by
Junio in 99a19b43 (to avoid ambiguous SHA-1 abbreviations from
being accepted). This allows us to avoid the alt_odb list setup
if we won't actually need it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Not every input value passed to get_sha1 is an abbreviated SHA-1.
Its actually quite common for refs to be passed and for those
refs to resolve to full SHA-1s, in which case we may not need to
initialize the alternate object database list in this process.
I'm relocating the call to prepare_alt_odb closer to the code
that actually needs it to maintain the fix first introduced by
Junio in 99a19b43 (to avoid ambiguous SHA-1 abbreviations from
being accepted). This allows us to avoid the alt_odb list setup
if we won't actually need it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c | diff | blob | history |