From: Brandon Casey Date: Wed, 1 Oct 2008 19:28:26 +0000 (-0500) Subject: xdiff-interface.c: strip newline (and cr) from line before pattern matching X-Git-Tag: v1.6.0.3~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=563d5a2c84fb5daf77dd8bfe569e92566a8fd52b;hp=563d5a2c84fb5daf77dd8bfe569e92566a8fd52b;p=git.git xdiff-interface.c: strip newline (and cr) from line before pattern matching POSIX doth sayeth: "In the regular expression processing described in IEEE Std 1003.1-2001, the is regarded as an ordinary character and both a period and a non-matching list can match one. ... Those utilities (like grep) that do not allow s to match are responsible for eliminating any from strings before matching against the RE." Thus far git has not been removing the trailing newline from strings matched against regular expression patterns. This has the effect that (quoting Jonathan del Strother) "... a line containing just 'FUNCNAME' (terminated by a newline) will be matched by the pattern '^(FUNCNAME.$)' but not '^(FUNCNAME$)'", and more simply not '^FUNCNAME$'. Signed-off-by: Brandon Casey Signed-off-by: Shawn O. Pearce ---