summaryrefslogtreecommitdiff
path: root/Documentation/git.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-23 07:57:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-23 21:38:43 (GMT)
commit3b5ef0e216d20a49dac223eb985c22c56512dbec (patch)
tree7db282ec66eaf92ce4198f377eb012045f23c5bc /Documentation/git.txt
parent78ed710fcf1a67a40eeca1be1a1bb8e8b7296177 (diff)
downloadgit-3b5ef0e216d20a49dac223eb985c22c56512dbec.zip
git-3b5ef0e216d20a49dac223eb985c22c56512dbec.tar.gz
git-3b5ef0e216d20a49dac223eb985c22c56512dbec.tar.bz2
xutils: Fix xdl_recmatch() on incomplete lines
Thell Fowler noticed that various "ignore whitespace" options to git diff do not work well on an incomplete line. The loop control of the function responsible for these bugs was extremely difficult to follow. This patch restructures the loops for three variants of "ignore whitespace" logic. The basic idea of the re-written logic is: - A loop runs while the characters from both strings we are looking at match. We declare unmatch immediately when we find something that does not match and return false from the function. We break out of the loop if we ran out of either side of the string. The way we skip spaces inside this loop varies depending on the style of ignoring whitespaces. - After the above loop breaks, we know that the parts of the strings we inspected so far match, ignoring the whitespaces. The lines can match only if the remainder consists of nothing but whitespaces. This part of the logic is shared across all three styles. The new code is more obvious and should be much easier to follow. Tested-by: Thell Fowler <git@tbfowler.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
0 files changed, 0 insertions, 0 deletions