git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Per Cederqvist <cederp@opera.com>,
	Jeff Sipek <jeffpc@josefsipek.net>,
	git@vger.kernel.org, ceder@lysator.liu.se
Subject: Re: [GUILT] handle branches with slashes in guilt-graph
Date: Tue, 18 Oct 2011 21:56:41 +0200	[thread overview]
Message-ID: <m2mxcydqfa.fsf@igel.home> (raw)
In-Reply-To: <7v39eqglle.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 18 Oct 2011 12:12:45 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> Per Cederqvist <cederp@opera.com> writes:
>>
>>> 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/ {
>>
>> Alternatively, you could change the delimiter to `,':
>>
>>   \,^$current refs/patches/$branch, {
>
> Isn't a comma still valid character in a branch name?

I suggested the comma because it is already used by the next sed
command, so that won't be a regression.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

      parent reply	other threads:[~2011-10-18 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2mxcydqfa.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=ceder@lysator.liu.se \
    --cc=cederp@opera.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffpc@josefsipek.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).