git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v2 0/2] fix cases of rebase -i ignoring core.commentchar
@ 2013-08-18 17:12 Eric Sunshine
  2013-08-18 17:12 ` [PATCH v2 1/2] rebase -i: fix skip_unnecessary_picks() to respect core.commentchar Eric Sunshine
  2013-08-18 17:12 ` [PATCH v2 2/2] rebase -i: fix core.commentchar regression Eric Sunshine
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sunshine @ 2013-08-18 17:12 UTC (permalink / raw
  To: git; +Cc: Eric Sunshine, Junio C Hamano, John Keeping, Ralf Thielow

This is a reroll of [1] which fixes a couple cases where rebase -i
ignores core.commentchar. One case was an oversight from the original
patch which added core.commentchar support to rebase -i, and is already
in 'maint'. The other is a regression introduced by [2] which is still
in 'next'.

In this reroll, the single patch from v1 is split into two: patch 1/2 is
suitable for 'maint'; and patch 2/2 is for 'next'. There are no other
changes.

I wanted to add tests to t3404 for these bugs but couldn't figure out
how to do it using the external interface of rebase -i. I was able to
verify before and after behavior by adding temporary echo's to the code
in order to observe the "internal" functioning.

[1]: http://git.661346.n2.nabble.com/PATCH-rebase-i-fix-cases-ignoring-core-commentchar-td7593965.html
[2]: http://git.661346.n2.nabble.com/PATCH-0-3-fix-interactive-rebase-short-SHA-1-collision-bug-td7593673.html#a7593676

Eric Sunshine (2):
  rebase -i: fix skip_unnecessary_picks() to respect core.commentchar
  rebase -i: fix core.commentchar regression

 git-rebase--interactive.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.8.4.rc3.500.gc3113b0

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

* [PATCH v2 1/2] rebase -i: fix skip_unnecessary_picks() to respect core.commentchar
  2013-08-18 17:12 [PATCH v2 0/2] fix cases of rebase -i ignoring core.commentchar Eric Sunshine
@ 2013-08-18 17:12 ` Eric Sunshine
  2013-08-18 17:12 ` [PATCH v2 2/2] rebase -i: fix core.commentchar regression Eric Sunshine
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Sunshine @ 2013-08-18 17:12 UTC (permalink / raw
  To: git; +Cc: Eric Sunshine, Junio C Hamano, John Keeping, Ralf Thielow

eff80a9fd990de36 (Allow custom "comment char", 2013-01-16) added general
core.commentchar support but forgot to update git-rebase--interactive to
respect it.  180bad3d10fe3a7f (rebase -i: respect core.commentchar,
2013-02-11) addressed this oversight but missed one instance of
hard-coded '#' comment character in skip_unnecessary_picks(). Fix this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

Suitable for 'maint'.

 git-rebase--interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index ea11e62..3733312 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -671,7 +671,7 @@ skip_unnecessary_picks () {
 				;;
 			esac
 			;;
-		3,#*|3,)
+		3,"$comment_char"*|3,)
 			# copy comments
 			;;
 		*)
-- 
1.8.4.rc3.500.gc3113b0

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

* [PATCH v2 2/2] rebase -i: fix core.commentchar regression
  2013-08-18 17:12 [PATCH v2 0/2] fix cases of rebase -i ignoring core.commentchar Eric Sunshine
  2013-08-18 17:12 ` [PATCH v2 1/2] rebase -i: fix skip_unnecessary_picks() to respect core.commentchar Eric Sunshine
@ 2013-08-18 17:12 ` Eric Sunshine
  2013-08-18 21:14   ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sunshine @ 2013-08-18 17:12 UTC (permalink / raw
  To: git; +Cc: Eric Sunshine, Junio C Hamano, John Keeping, Ralf Thielow

9a46c25bdbf79744 (rebase: interactive: fix short SHA-1 collision,
2013-08-12) added transform_todo_ids() which assumes incorrectly that
the comment character is always '#', however, this has not been the case
since 180bad3d10fe3a7f (rebase -i: respect core.commentchar, 2013-02-11)
patched rebase -i to respect core.commentchar. Fix this regression.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

Intended for 'next'.

 git-rebase--interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 3733312..f246810 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -693,7 +693,7 @@ transform_todo_ids () {
 	while read -r command rest
 	do
 		case "$command" in
-		'#'* | exec)
+		"$comment_char"* | exec)
 			# Be careful for oddball commands like 'exec'
 			# that do not have a SHA-1 at the beginning of $rest.
 			;;
-- 
1.8.4.rc3.500.gc3113b0

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

* Re: [PATCH v2 2/2] rebase -i: fix core.commentchar regression
  2013-08-18 17:12 ` [PATCH v2 2/2] rebase -i: fix core.commentchar regression Eric Sunshine
@ 2013-08-18 21:14   ` Junio C Hamano
  2013-08-19  0:29     ` Eric Sunshine
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2013-08-18 21:14 UTC (permalink / raw
  To: Eric Sunshine; +Cc: git, John Keeping, Ralf Thielow

Eric Sunshine <sunshine@sunshineco.com> writes:

> Intended for 'next'.

Thanks.

Will queue on top of es/rebase-i-no-abbrev, but we have a chance to
rebuild 'next' after 1.8.4 release, so we may want to squash this
into the problematic commit when it happens.


>
>  git-rebase--interactive.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 3733312..f246810 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -693,7 +693,7 @@ transform_todo_ids () {
>  	while read -r command rest
>  	do
>  		case "$command" in
> -		'#'* | exec)
> +		"$comment_char"* | exec)
>  			# Be careful for oddball commands like 'exec'
>  			# that do not have a SHA-1 at the beginning of $rest.
>  			;;

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

* Re: [PATCH v2 2/2] rebase -i: fix core.commentchar regression
  2013-08-18 21:14   ` Junio C Hamano
@ 2013-08-19  0:29     ` Eric Sunshine
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sunshine @ 2013-08-19  0:29 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Git List, John Keeping, Ralf Thielow

On Sun, Aug 18, 2013 at 5:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> Intended for 'next'.
>
> Thanks.
>
> Will queue on top of es/rebase-i-no-abbrev, but we have a chance to
> rebuild 'next' after 1.8.4 release, so we may want to squash this
> into the problematic commit when it happens.

That would be fine. Time permitting, I also would like to send out a
couple incremental patches atop 'next' which address your comments [1]
about es/rebase-i-no-abbrev. Those new patches should be suitable for
squashing if you want to go that route.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/232146

>>
>>  git-rebase--interactive.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
>> index 3733312..f246810 100644
>> --- a/git-rebase--interactive.sh
>> +++ b/git-rebase--interactive.sh
>> @@ -693,7 +693,7 @@ transform_todo_ids () {
>>       while read -r command rest
>>       do
>>               case "$command" in
>> -             '#'* | exec)
>> +             "$comment_char"* | exec)
>>                       # Be careful for oddball commands like 'exec'
>>                       # that do not have a SHA-1 at the beginning of $rest.
>>                       ;;

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

end of thread, other threads:[~2013-08-19  0:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18 17:12 [PATCH v2 0/2] fix cases of rebase -i ignoring core.commentchar Eric Sunshine
2013-08-18 17:12 ` [PATCH v2 1/2] rebase -i: fix skip_unnecessary_picks() to respect core.commentchar Eric Sunshine
2013-08-18 17:12 ` [PATCH v2 2/2] rebase -i: fix core.commentchar regression Eric Sunshine
2013-08-18 21:14   ` Junio C Hamano
2013-08-19  0:29     ` Eric Sunshine

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).