[]
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 5383258..d50acb8 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -16,8 +16,31 @@ cmp_cache_tree () {
# We don't bother with actually checking the SHA1:
# test-dump-cache-tree already verifies that all existing data is
# correct.
+generate_expected_cache_tree () {
+ if [ -n "$1" ]
+ then
+ local dir="$1/"
+ else
+ local dir="$1"
+ fi
I think the Git test cases prefer "test" over "[]":
if test -n "$1"
then
local dir="$1/"
else
local dir="$1"
fi
And should there be a && after the "fi" ?
And as test -n tests for a non-zero string,
could we write like this (and drop the local ?)?
if test -n "$1"
then
dir="$1/"
else
dir=""
fi
--
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