Skip to content

Commit bbe0616

Browse files
bk2204gitster
authored andcommitted
t9104: make hash size independent
The size of a record in the database used by git svn is four bytes plus the length of the binary hash. Instead of hard-coding 24, compute this value based on the size of the hash in use. Signed-off-by: brian m. carlson <[email protected]> Acked-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 407527b commit bbe0616

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t9104-git-svn-follow-parent.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ test_expect_success "track initial change if it was only made to parent" '
161161
'
162162

163163
test_expect_success "follow-parent is atomic" '
164+
record_size=$(($(test_oid rawsz) + 4)) &&
164165
(
165166
cd wc &&
166167
svn_cmd up &&
@@ -186,7 +187,7 @@ test_expect_success "follow-parent is atomic" '
186187
mkdir -p "$GIT_DIR"/svn/refs/remotes/flunk@18 &&
187188
rev_map=$(cd "$GIT_DIR"/svn/refs/remotes/stunk && ls .rev_map*) &&
188189
dd if="$GIT_DIR"/svn/refs/remotes/stunk/$rev_map \
189-
of="$GIT_DIR"/svn/refs/remotes/flunk@18/$rev_map bs=24 count=1 &&
190+
of="$GIT_DIR"/svn/refs/remotes/flunk@18/$rev_map bs=$record_size count=1 &&
190191
rm -rf "$GIT_DIR"/svn/refs/remotes/stunk &&
191192
git svn init --minimize-url -i flunk "$svnrepo"/flunk &&
192193
git svn fetch -i flunk &&

0 commit comments

Comments
 (0)