git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2011, 19:12 UTC
Message-ID
<7v39eqglle.fsf@alter.siamese.dyndns.org>
In-Reply-To
<m2r52adu65.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
Show 21 quoted lines
> 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?
The vertical var | is available, though ;-)
Previous: Andreas SchwabNext: Junio C Hamano
Message 4 of 6 in “[GUILT] handle branches with slashes in guilt-graph”
  1. Per CederqvistOct 18, 2011
  2. Jeff SipekOct 18, 2011
  3. Andreas SchwabOct 18, 2011
  4. Junio C HamanoOct 18, 2011
  5. Junio C HamanoOct 18, 2011
  6. Andreas SchwabOct 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.