diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-10 12:02:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-10 12:37:54 -0700 |
commit | 2e83b66c32c1d482575fd8caed80680a2f69c5f1 (patch) | |
tree | 8b3fc22561a43f5abf81c4c6c88a194dc58180dd /Documentation/git-remote-helpers.txt | |
parent | fix overstrict :<path> diagnosis (diff) | |
download | tgif-2e83b66c32c1d482575fd8caed80680a2f69c5f1.tar.xz |
fix overslow :/no-such-string-ever-existed diagnostics
"git cmd :/no-such-string-ever-existed" runs an extra round of get_sha1()
since 009fee4 (Detailed diagnosis when parsing an object name fails.,
2009-12-07). Once without error diagnosis to see there is no commit with
such a string in the log message (hence "it cannot be a ref"), and after
seeing that :/no-such-string-ever-existed is not a filename (hence "it
cannot be a path, either"), another time to give "better diagnosis".
The thing is, the second time it runs, we already know that traversing the
history all the way down to the root will _not_ find any matching commit.
Rename misguided "gently" parameter, which is turned off _only_ when the
"detailed diagnosis" codepath knows that it cannot be a ref and making the
call only for the caller to die with a message. Flip its meaning (and
adjust the callers) and call it "only_to_die", which is not a great name,
but it describes far more clearly what the codepaths that switches their
behaviour based on this variable do.
On my box, the command spends ~1.8 seconds without the patch to make the
report; with the patch it spends ~1.12 seconds.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-remote-helpers.txt')
0 files changed, 0 insertions, 0 deletions