Re: [PATCH 2/2] add--interactive: quote commentChar regex

2017-06-21 Thread Christian Rösch
Thanks for the quick reaction and fix! On 21/06/17 21:28, Jeff King wrote: > 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). So things would get worse when

[PATCH 2/2] add--interactive: quote commentChar regex

2017-06-21 Thread Jeff King
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: /^$commen