diff options
author | Jeff King <peff@peff.net> | 2017-06-21 15:28:59 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-21 14:06:20 -0700 |
commit | d85d7ecb80ebc93f7380b4196c303756ee051668 (patch) | |
tree | e6d3a487d649072ded75b3141c9152664d7fdd3b /sideband.c | |
parent | d5addcf522deb05d259ecbc0946584d977879565 (diff) | |
download | git-jk/add-p-commentchar-fix.tar.gz |
add--interactive: quote commentChar regexjk/add-p-commentchar-fix
Since c9d961647 (i18n: add--interactive: mark
edit_hunk_manually message for translation, 2016-12-14),
when the user asks to edit a hunk manually, we respect
core.commentChar in generating the edit instructions.
However, when we then strip out comment lines, we use a
simple regex like:
/^$commentChar/
If your chosen comment character is a regex metacharacter,
then that will behave in a confusing manner ("$", for
instance, would only eliminate blank lines, not actual
comment lines).
We can fix that by telling perl not to respect
metacharacters.
Reported-by: Christian Rösch <christian@croesch.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sideband.c')
0 files changed, 0 insertions, 0 deletions