Skip to content

Commit

Permalink
t6050: make sure we test not just commit replacement
Browse files Browse the repository at this point in the history
The replacement mechanism should affect all types of objects not
just commits, so make sure it deals with at least a blob.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed May 15, 2011
1 parent fea33a1 commit abb25ac
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions t/t6050-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,20 @@ test_expect_success 'index-pack and replacements' '
git index-pack test-*.pack
'

#
#
test_expect_success 'not just commits' '
echo replaced >file &&
git add file &&
REPLACED=$(git rev-parse :file) &&
mv file file.replaced &&
echo original >file &&
git add file &&
ORIGINAL=$(git rev-parse :file) &&
git update-ref refs/replace/$ORIGINAL $REPLACED &&
mv file file.original &&
git checkout file &&
test_cmp file.replaced file
'

test_done

0 comments on commit abb25ac

Please sign in to comment.