git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rebase -i: fix cases ignoring core.commentchar
@ 2013-08-16 21:44 Eric Sunshine
  2013-08-16 21:55 ` Eric Sunshine
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sunshine @ 2013-08-16 21:44 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.

9a46c25bdbf79744 (rebase: interactive: fix short SHA-1 collision,
2013-08-12) added another instance of hard-coded '#' comment character
in transform_todo_ids().  Fix this, as well.

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

While planning to work on a couple patches to address Junio's comments
on [1] (currently in 'next'), I realized that that series introduced a
small regression by ignoring core.commentchar and assuming that the todo
list comment character is unconditionally '#'. This patch fixes that
regression.

While fixing the regression, I also noticed that the original patch
(180bad3d10fe3a7f) which added core.commentchar support to rebase -i
missed one instance. This patch fixes that, as well.

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

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

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index ea11e62..f246810 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
 			;;
 		*)
@@ -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

end of thread, other threads:[~2013-08-18 20:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16 21:44 [PATCH] rebase -i: fix cases ignoring core.commentchar Eric Sunshine
2013-08-16 21:55 ` Eric Sunshine
2013-08-16 22:19   ` Eric Sunshine
2013-08-18 20:29     ` Junio C Hamano
2013-08-18 20:36       ` Eric Sunshine

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).