summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1055880)
raw | patch | inline | side by side (parent: 1055880)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 30 May 2007 04:50:26 +0000 (00:50 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 30 May 2007 05:50:10 +0000 (22:50 -0700) |
My recent patch "Lazily open pack index files on demand" caused a
regression in the case of parsing abbreviated SHA-1 object names.
Git was unable to translate the abbreviated name into the full name
if the object was packed, as the pack .idx files were not opened
before being accessed.
This is a simple test to repack a repository then test for an
abbreviated SHA-1 within the packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
regression in the case of parsing abbreviated SHA-1 object names.
Git was unable to translate the abbreviated name into the full name
if the object was packed, as the pack .idx files were not opened
before being accessed.
This is a simple test to repack a repository then test for an
abbreviated SHA-1 within the packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t6101-rev-parse-parents.sh | patch | blob | history |
index 7d354a1fae774ca0e77e554dad827f1a9b781818..b0252b9413e5274d87f5437882be1fd625bc8bef 100755 (executable)
test_expect_failure '--verify start2^1' 'git-rev-parse --verify start2^1'
test_expect_success '--verify start2^0' 'git-rev-parse --verify start2^0'
+test_expect_success 'repack for next test' 'git repack -a -d'
+test_expect_success 'short SHA-1 works' '
+ start=`git rev-parse --verify start` &&
+ echo $start &&
+ abbrv=`echo $start | sed s/.\$//` &&
+ echo $abbrv &&
+ abbrv=`git rev-parse --verify $abbrv` &&
+ echo $abbrv &&
+ test $start = $abbrv'
+
test_done