Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
---
 t/t0400-external-odb.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index 0f1bb97f38..6c6da5cf4f 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-odb.sh
@@ -57,4 +57,13 @@ test_expect_success 'helper can retrieve alt objects' '
        test_cmp expect actual
 '
 
+test_expect_success 'helper can add objects to alt repo' '
+       hash=$(echo "Hello odb!" | git hash-object -w -t blob --stdin) &&
+       test -f .git/objects/$(echo $hash | sed "s#..#&/#") &&
+       size=$(git cat-file -s "$hash") &&
+       git cat-file blob "$hash" | ./odb-helper put "$hash" "$size" blob &&
+       alt_size=$(cd alt-repo && git cat-file -s "$hash") &&
+       test "$size" -eq "$alt_size"
+'
+
 test_done
-- 
2.11.0.rc2.37.geb49ca6

Reply via email to