* [PATCH] Missing quotes
@ 2005-04-21 12:45 Matthias Urlichs
0 siblings, 0 replies; only message in thread
From: Matthias Urlichs @ 2005-04-21 12:45 UTC (permalink / raw)
To: git
gitXnormid.sh should quote its cat-file calls so that nonexisting ssha1
IDs don't result in shell errors.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
--- 42a073eb6b5bb397a3e8768a032463a7fa02e6b9/gitXnormid.sh (mode:100755 sha1:c0d53afabe8662ebfc3c697faf08b0a2b43c93f7)
+++ 265515f9c4f089b1b61e9d2312c4b3babe189618/gitXnormid.sh (mode:100644 sha1:94710a7a2ab945f1fbd5350cb0de15171ae3f582)
@@ -41,11 +41,11 @@
exit 1
fi
-if [ "$type" = "tree" ] && [ $(cat-file -t "$id") = "commit" ]; then
+if [ "$type" = "tree" ] && [ "$(cat-file -t "$id")" = "commit" ]; then
id=$(cat-file commit $id | egrep "$TREE" | cut -d ' ' -f 2)
fi
-if [ $(cat-file -t "$id") != "$type" ]; then
+if [ "$(cat-file -t "$id")" != "$type" ]; then
echo "Invalid id: $id" >&2
exit 1
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-21 12:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 12:45 [PATCH] Missing quotes Matthias Urlichs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox