Subject: [GUILT] handle branches with slashes in guilt-graph

From: Per Cederqvist <[email-masked]>
Date: Tue, 18 Oct 2011 12:40:59 +0200

Avoid sed errors when the branch name contains a slash.

Signed-off-by: Per Cederqvist <[email-masked]>

--- /usr/bin/guilt-graph~	2011-01-25 20:15:50.000000000 +0100
+++ /usr/bin/guilt-graph	2011-10-18 12:30:31.000000000 +0200
@@ -37,9 +37,10 @@ disp "digraph G {"

  current="$top"

+safebranch=`echo "$branch"|sed 's%/%\\\\/%g'`
  while [ "$current" != "$base" ]; do
  	pname=`git show-ref | sed -n -e "
-/^$current refs\/patches\/$branch/ {
+/^$current refs\/patches\/$safebranch/ {
  	s,^$current refs/patches/$branch/,,
  	p
  	q