Signed-off-by: Christian Couder <[email protected]>
---
t/t0400-external-odb.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index fe85413..0f1bb97 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-odb.sh
@@ -7,6 +7,10 @@ test_description='basic tests for external object databases'
ALT_SOURCE="$PWD/alt-repo/.git"
export ALT_SOURCE
write_script odb-helper <<\EOF
+die() {
+ printf >&2 "%s\n" "$@"
+ exit 1
+}
GIT_DIR=$ALT_SOURCE; export GIT_DIR
case "$1" in
have)
@@ -16,6 +20,16 @@ have)
get)
cat "$GIT_DIR"/objects/$(echo $2 | sed 's#..#&/#')
;;
+put)
+ sha1="$2"
+ size="$3"
+ kind="$4"
+ writen=$(git hash-object -w -t "$kind" --stdin)
+ test "$writen" = "$sha1" || die "bad sha1 passed '$sha1' vs writen
'$writen'"
+ ;;
+*)
+ die "unknown command '$1'"
+ ;;
esac
EOF
HELPER="\"$PWD\"/odb-helper"
--
2.9.0.rc2.11.g990c140
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html