git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.0: Comment in rebase instruction has become too rigid
@ 2015-09-29 14:02 Nazri Ramliy
  2015-09-29 15:05 ` Matthieu Moy
  0 siblings, 1 reply; 6+ messages in thread
From: Nazri Ramliy @ 2015-09-29 14:02 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I noticed that the format of the comment lines in a rebase instruction
sheet has become stricter - it could no longer begin with spaces or
tabs. The comment char ("#" for example) has to appear on the first
column.

This break my little script (activated via some key binding in my
$EDITOR) for adding the list of modified files under each "pick"
command. The way I have it setup is something like this, given the
following rebase intruction:

  pick deadbeef some commit message
  pick cafebabe another commit message

I'd hit that key in my editor that filters the pick instructions add
inserts the list of the modified files in each commit so that the
instruction sheet becomes like this:

  pick deadbeef some commit message
     # M path/to/foo.txt | 15 ++++----------
  pick cafebabe another commit message
     # M bar.txt | 2 +-


IIRC before git 2.6.0 this worked fine. With git 2.6.0 the rebase
stops midway with warning about invalid instruction due to the now
no-longer recognized indented comments.

I could work around this by changing my script so that it removes the
indentation prefix so that the instruction would become like this:

  pick deadbeef some commit message
  # M path/to/foo.txt | 15 ++++----------
  pick cafebabe another commit message
  # M bar.txt | 2 +-

but this would make it harder to read because of the increased clutter
between the rebase instructions and the informative "what files were
changed in this commit" comment.

Looking at git-rebase--interactive.sh it seems that this is due to
"git stripspace --strip-comments".

Would it be okay if the behavior is reverted to the old one - which is
to recognize indented comments in the rebase instruction?

Nazri

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

end of thread, other threads:[~2015-09-29 18:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 14:02 2.6.0: Comment in rebase instruction has become too rigid Nazri Ramliy
2015-09-29 15:05 ` Matthieu Moy
2015-09-29 17:01   ` Matthieu Moy
2015-09-29 18:17     ` Junio C Hamano
2015-09-29 18:30       ` Junio C Hamano
2015-09-29 18:31       ` Ralf Thielow

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