diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-15 23:54:00 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-15 23:54:00 +0300 |
commit | 6677c4665af2d73f670bec382bc82d0f2e9513fb (patch) | |
tree | 7197059b14f5e6b820d2b8708434347160ef26e6 /t/test-lib.sh | |
parent | 8431c4eb0976b0558eaa1df475ce6de6b52ce484 (diff) |
get_sha1_basic(): corner case ambiguity fix
When .git/refs/heads/frotz and .git/refs/tags/frotz existed, and
the object name stored in .git/refs/heads/frotz were corrupt, we
ended up picking tags/frotz without complaining. Worse yet, if
the corrupt .git/refs/heads/frotz was more than 40 bytes and
began with hexadecimal characters, it silently overwritten the
initial part of the returned result.
This commit adds a couple of tests to demonstrate these cases,
with a fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/test-lib.sh')
-rwxr-xr-x | t/test-lib.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 2819bef1c4..a97d259e26 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -18,6 +18,7 @@ unset GIT_ALTERNATE_OBJECT_DIRECTORIES unset GIT_AUTHOR_DATE unset GIT_AUTHOR_EMAIL unset GIT_AUTHOR_NAME +unset GIT_COMMITTER_DATE unset GIT_COMMITTER_EMAIL unset GIT_COMMITTER_NAME unset GIT_DIFF_OPTS |