git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GUILT] handle branches with slashes in guilt-graph
@ 2011-10-18 10:40 Per Cederqvist
  2011-10-18 13:30 ` Jeff Sipek
  2011-10-18 18:35 ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Per Cederqvist @ 2011-10-18 10:40 UTC (permalink / raw)
  To: Jeff Sipek; +Cc: git, ceder

Avoid sed errors when the branch name contains a slash.

Signed-off-by: Per Cederqvist <cederp@opera.com>

--- /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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-18 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 10:40 [GUILT] handle branches with slashes in guilt-graph Per Cederqvist
2011-10-18 13:30 ` Jeff Sipek
2011-10-18 18:35 ` Andreas Schwab
2011-10-18 19:12   ` Junio C Hamano
2011-10-18 19:15     ` Junio C Hamano
2011-10-18 19:56     ` Andreas Schwab

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).