mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-16 11:35:18 -06:00
Languages like Lua and SQL use "--" to mark a line as commented out. If this appears at column 0 and is part of the pre-image we may see "--- foo" in the diff, indicating that the line whose content is "-- foo" has been removed from the new version. git-gui was incorrectly parsing "--- foo" as the old file name in the file header, causing it to generate a bad patch file when the user tried to stage or unstage a hunk or the selected line. We need to keep track of where we are in the parsing so that we do not misread a deletion or addition record as part of the header. Reported-by: Alexander Gladysh <agladysh@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Description
Languages
C
51.7%
Shell
37.5%
Perl
4.3%
Tcl
3%
Python
0.8%
Other
2.5%