git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cg-status: quote head name
@ 2005-11-14 22:57 Pavel Roskin
  0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2005-11-14 22:57 UTC (permalink / raw)
  To: git, Petr Baudis

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-14 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 22:57 [PATCH] cg-status: quote head name Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).