summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git
diff options
context:
space:
mode:
authorLibravatar Brodie Rao <brodie@sf.io>2014-01-06 19:32:01 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-07 09:51:56 -0800
commit832cf74c0792a58c9c28e32a8fe5dbb694f0cce6 (patch)
tree3b6a5b33ce61f80d935028818c65f5a160ec8921 /contrib/mw-to-git
parentMerge branch 'maint' of git://github.com/git-l10n/git-po into maint (diff)
downloadtgif-832cf74c0792a58c9c28e32a8fe5dbb694f0cce6.tar.xz
sha1_name: don't resolve refs when core.warnambiguousrefs is false
When seeing a full 40-hex object name, get_sha1_basic() unconditionally checks if the string can also be interpreted as a refname, but the result will not be used unless warn_ambiguous_refs is in effect. Omitting this unnecessary ref resolution provides a substantial performance improvement, especially when passing many hashes to a command (like "git rev-list --stdin") and core.warnambiguousrefs is set to false. The check incurs 6 stat()s for every hash supplied, which can be costly over NFS. Signed-off-by: Brodie Rao <brodie@sf.io> Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git')
0 files changed, 0 insertions, 0 deletions