# [PATCH] cg-status: quote head name

1 messages from 2005-11-14 to 2005-11-14. Participants: Pavel Roskin.
Thread: https://gitlist.dev/t/2512

## Pavel Roskin, 2005-11-14 22:57

Subject: [PATCH] cg-status: quote head name
Message-ID: <1132009061.24084.26.camel@dv>
URL: https://gitlist.dev/e/1132009061.24084.26.camel%40dv

```
cg-status should quote head name to deal with branches that have active
characters (e.g. spaces) in the name.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/cg-status b/cg-status
index b67f505..2cb86be 100755
--- a/cg-status
+++ b/cg-status
@@ -124,8 +124,8 @@ if [ "$gitstatus" ]; then
 
 	echo "Heads:"
 	for head in $_git/refs/heads/*; do
-		headsha1=$(cat $head)
-		headname=$(basename $head)
+		headsha1=$(cat "$head")
+		headname=$(basename "$head")
 		[ "$headname" = "cg-seek-point" ] && continue
 		cf=" "; rf=" "
 		[ "$headname" = "$_git_head" ] && cf=">"


-- 
Regards,
Pavel Roskin

```
