summaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-11-18 23:35:39 +0100
committerJunio C Hamano <junkio@cox.net>2006-11-21 14:35:40 -0800
commit6d55f05576851aedc7c53f7438c1d505c22ee78f (patch)
tree7c2371b831219b2a13511f86c0269a740e5f9766 /builtin-mv.c
parent04408c3578300ac7cc1b1530bbaec54de299b200 (diff)
downloadgit-6d55f05576851aedc7c53f7438c1d505c22ee78f.tar.gz
gitweb: Buffer diff header to deal with split patches + git_patchset_body refactoring
There are some cases when one line from "raw" git-diff output (raw format) corresponds to more than one patch in the patchset git-diff output. To deal with this buffer git diff header and extended diff header (everything up to actual patch) to check from information from "index <hash>..<hash>" extended header line if the patch corresponds to the same or next difftree raw line. This could also be used to gather information needed for hyperlinking, and used for printing gitweb quoted filenames, from extended diff header instead of raw git-diff output. While at it, refactor git_patchset_body subroutine from the event-driven, AWK-like state-machine parsing to sequential parsing: for each patch parse (and output) git diff header, parse extended diff header, parse two-line from-file/to-file diff header, parse patch itself; patch ends with the end of input [file] or the line matching m/^diff /. For better understanding the code, there were added assertions in the comments a la Carp::Assert module. Just in case there is commented out code dealing with unexpected end of input (should not happen, hence commented out). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-mv.c')
0 files changed, 0 insertions, 0 deletions