summaryrefslogtreecommitdiff
path: root/patch-ids.h
diff options
context:
space:
mode:
authorLibravatar Jakub Narebski <jnareb@gmail.com>2007-06-08 13:27:42 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-06-10 16:57:48 -0700
commit90921740bd00029708370673fdc537522aa48e6f (patch)
tree6e29cd65052bd8d2aa1693a283b531ce9195337d /patch-ids.h
parentgitweb: Improve "next" link in commitdiff view (diff)
downloadtgif-90921740bd00029708370673fdc537522aa48e6f.tar.xz
gitweb: Split git_patchset_body into separate subroutines
This commit makes git_patchset_body easier to read, and reduces level of nesting and indent level. It adds more lines that it removes because of extra parameter passing in subroutines, and subroutine calls in git_patchset_body. Also because there are few added comments. Below there are descriptions of all split-off subroutines: Separate formatting "git diff" header into format_git_diff_header_line. While at it fix it so it always escapes pathname. It would be even more useful if we decide to use `--cc' for merges, and need to generate by hand empty patches for anchors. Separate formatting extended (git) diff header lines into format_extended_diff_header_line. This one is copied without changes. Separate formatting two-lines from-file/to-file diff header into format_diff_from_to_header subroutine. While at it fix it so it always escapes pathname. Beware calling convention: it takes _two_ lines. Separate generating %from and %to hashes (with info used among others to generate hyperlinks) into parse_from_to_diffinfo subroutine. This one is copied without changes. Separate checking if file was deleted (and among others therefore does not have link to the result file) into is_deleted subroutine. This would allow us to easily change the algotithm to find if file is_deleted in the result. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'patch-ids.h')
0 files changed, 0 insertions, 0 deletions