{"thread":{"id":"28711","subject":"[GUILT] handle branches with slashes in guilt-graph","startedAt":"2011-10-18T10:40:59Z","lastAt":"2011-10-18T19:56:41Z","messageCount":6,"participants":["Per Cederqvist","Jeff Sipek","Andreas Schwab","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"177943","messageId":"4E9D57BB.2030707@opera.com","threadId":"28711","inReplyTo":null,"subject":"[GUILT] handle branches with slashes in guilt-graph","fromName":"Per Cederqvist","fromEmail":"cederp@opera.com","sentAt":"2011-10-18T10:40:59Z","receivedAt":"2011-10-18T10:40:59Z","isPatch":false,"sender":{"key":"cederp@opera.com","avatar":"https://gravatar.com/avatar/008fe28caedea0ba34042cd5157705267934f4ba7a9b29fb248ae18ec5b3055e?d=mp&s=160"},"body":"Avoid sed errors when the branch name contains a slash.\n\nSigned-off-by: Per Cederqvist <cederp@opera.com>\n\n--- /usr/bin/guilt-graph~\t2011-01-25 20:15:50.000000000 +0100\n+++ /usr/bin/guilt-graph\t2011-10-18 12:30:31.000000000 +0200\n@@ -37,9 +37,10 @@ disp \"digraph G {\"\n\n  current=\"$top\"\n\n+safebranch=`echo \"$branch\"|sed 's%/%\\\\\\\\/%g'`\n  while [ \"$current\" != \"$base\" ]; do\n  \tpname=`git show-ref | sed -n -e \"\n-/^$current refs\\/patches\\/$branch/ {\n+/^$current refs\\/patches\\/$safebranch/ {\n  \ts,^$current refs/patches/$branch/,,\n  \tp\n  \tq\n"},{"id":"177946","messageId":"20111018133038.GA16088@josefsipek.net","threadId":"28711","inReplyTo":"4E9D57BB.2030707@opera.com","subject":"Re: [GUILT] handle branches with slashes in guilt-graph","fromName":"Jeff Sipek","fromEmail":"jeffpc@josefsipek.net","sentAt":"2011-10-18T13:30:38Z","receivedAt":"2011-10-18T13:30:38Z","isPatch":false,"sender":{"key":"jeffpc@josefsipek.net","avatar":null},"body":"On Tue, Oct 18, 2011 at 12:40:59PM +0200, Per Cederqvist wrote:\n> Avoid sed errors when the branch name contains a slash.\n\nMakes sense.  I'll test it and add it to my patch queue.\n\nThanks,\n\nJeff.\n\n> Signed-off-by: Per Cederqvist <cederp@opera.com>\n> \n> --- /usr/bin/guilt-graph~\t2011-01-25 20:15:50.000000000 +0100\n> +++ /usr/bin/guilt-graph\t2011-10-18 12:30:31.000000000 +0200\n> @@ -37,9 +37,10 @@ disp \"digraph G {\"\n> \n>  current=\"$top\"\n> \n> +safebranch=`echo \"$branch\"|sed 's%/%\\\\\\\\/%g'`\n>  while [ \"$current\" != \"$base\" ]; do\n>  \tpname=`git show-ref | sed -n -e \"\n> -/^$current refs\\/patches\\/$branch/ {\n> +/^$current refs\\/patches\\/$safebranch/ {\n>  \ts,^$current refs/patches/$branch/,,\n>  \tp\n>  \tq\n\n-- \nOnce you have their hardware. Never give it back.\n(The First Rule of Hardware Acquisition)\n"},{"id":"177961","messageId":"m2r52adu65.fsf@igel.home","threadId":"28711","inReplyTo":"4E9D57BB.2030707@opera.com","subject":"Re: [GUILT] handle branches with slashes in guilt-graph","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-10-18T18:35:46Z","receivedAt":"2011-10-18T18:35:46Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Per Cederqvist <cederp@opera.com> writes:\n\n> Avoid sed errors when the branch name contains a slash.\n>\n> Signed-off-by: Per Cederqvist <cederp@opera.com>\n>\n> --- /usr/bin/guilt-graph~\t2011-01-25 20:15:50.000000000 +0100\n> +++ /usr/bin/guilt-graph\t2011-10-18 12:30:31.000000000 +0200\n> @@ -37,9 +37,10 @@ disp \"digraph G {\"\n>\n>  current=\"$top\"\n>\n> +safebranch=`echo \"$branch\"|sed 's%/%\\\\\\\\/%g'`\n>  while [ \"$current\" != \"$base\" ]; do\n>  \tpname=`git show-ref | sed -n -e \"\n> -/^$current refs\\/patches\\/$branch/ {\n> +/^$current refs\\/patches\\/$safebranch/ {\n\nAlternatively, you could change the delimiter to `,':\n\n  \\,^$current refs/patches/$branch, {\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"177962","messageId":"7v39eqglle.fsf@alter.siamese.dyndns.org","threadId":"28711","inReplyTo":"m2r52adu65.fsf@igel.home","subject":"Re: [GUILT] handle branches with slashes in guilt-graph","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-18T19:12:45Z","receivedAt":"2011-10-18T19:12:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n> Per Cederqvist <cederp@opera.com> writes:\n>\n>> Avoid sed errors when the branch name contains a slash.\n>>\n>> Signed-off-by: Per Cederqvist <cederp@opera.com>\n>>\n>> --- /usr/bin/guilt-graph~\t2011-01-25 20:15:50.000000000 +0100\n>> +++ /usr/bin/guilt-graph\t2011-10-18 12:30:31.000000000 +0200\n>> @@ -37,9 +37,10 @@ disp \"digraph G {\"\n>>\n>>  current=\"$top\"\n>>\n>> +safebranch=`echo \"$branch\"|sed 's%/%\\\\\\\\/%g'`\n>>  while [ \"$current\" != \"$base\" ]; do\n>>  \tpname=`git show-ref | sed -n -e \"\n>> -/^$current refs\\/patches\\/$branch/ {\n>> +/^$current refs\\/patches\\/$safebranch/ {\n>\n> Alternatively, you could change the delimiter to `,':\n>\n>   \\,^$current refs/patches/$branch, {\n\nIsn't a comma still valid character in a branch name?\n\nThe vertical var | is available, though ;-)\n"},{"id":"177963","messageId":"7vy5wif6w3.fsf@alter.siamese.dyndns.org","threadId":"28711","inReplyTo":"7v39eqglle.fsf@alter.siamese.dyndns.org","subject":"Re: [GUILT] handle branches with slashes in guilt-graph","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-18T19:15:40Z","receivedAt":"2011-10-18T19:15:40Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> Alternatively, you could change the delimiter to `,':\n>>\n>>   \\,^$current refs/patches/$branch, {\n>\n> Isn't a comma still valid character in a branch name?\n>\n> The vertical var | is available, though ;-)\n\nNah, sorry, '|' is not.\n"},{"id":"177966","messageId":"m2mxcydqfa.fsf@igel.home","threadId":"28711","inReplyTo":"7v39eqglle.fsf@alter.siamese.dyndns.org","subject":"Re: [GUILT] handle branches with slashes in guilt-graph","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-10-18T19:56:41Z","receivedAt":"2011-10-18T19:56:41Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Andreas Schwab <schwab@linux-m68k.org> writes:\n>\n>> Per Cederqvist <cederp@opera.com> writes:\n>>\n>>> Avoid sed errors when the branch name contains a slash.\n>>>\n>>> Signed-off-by: Per Cederqvist <cederp@opera.com>\n>>>\n>>> --- /usr/bin/guilt-graph~\t2011-01-25 20:15:50.000000000 +0100\n>>> +++ /usr/bin/guilt-graph\t2011-10-18 12:30:31.000000000 +0200\n>>> @@ -37,9 +37,10 @@ disp \"digraph G {\"\n>>>\n>>>  current=\"$top\"\n>>>\n>>> +safebranch=`echo \"$branch\"|sed 's%/%\\\\\\\\/%g'`\n>>>  while [ \"$current\" != \"$base\" ]; do\n>>>  \tpname=`git show-ref | sed -n -e \"\n>>> -/^$current refs\\/patches\\/$branch/ {\n>>> +/^$current refs\\/patches\\/$safebranch/ {\n>>\n>> Alternatively, you could change the delimiter to `,':\n>>\n>>   \\,^$current refs/patches/$branch, {\n>\n> Isn't a comma still valid character in a branch name?\n\nI suggested the comma because it is already used by the next sed\ncommand, so that won't be a regression.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}