[GUILT] handle branches with slashes in guilt-graph

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[GUILT] handle branches with slashes in guilt-graph

From: Per Cederqvist <hidden>
Date: 2016-06-15 22:52:17

Avoid sed errors when the branch name contains a slash.

Signed-off-by: Per Cederqvist <redacted>
--- /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

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

From: Jeff Sipek <hidden>
Date: 2016-06-15 22:52:17

On Tue, Oct 18, 2011 at 12:40:59PM +0200, Per Cederqvist wrote:
Avoid sed errors when the branch name contains a slash.
Makes sense.  I'll test it and add it to my patch queue.

Thanks,

Jeff.
quoted hunk
Signed-off-by: Per Cederqvist <redacted>
--- /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
-- 
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help