aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-20 23:51:06 -0700
committerJunio C Hamano <junkio@cox.net>2007-05-20 23:51:06 -0700
commit077e1af5983000266bc7c1423a87b7768ca03754 (patch)
tree972c5b8f9823cad61171fdd378ff23690de31faa /Documentation
parentefe7f3586156bff4d29c347a1c41f93627c9f3e3 (diff)
downloadgit-077e1af5983000266bc7c1423a87b7768ca03754.tar.gz
git-077e1af5983000266bc7c1423a87b7768ca03754.tar.xz
git-apply: Fix removal of new trailing blank lines.
The earlier code removed one newline too many from the hunk that adds new lines at the end of the file. Also the way the code counted the added blank lines was somewhat roundabout; I think the way updated code does it is more direct and easier to follow: * We keep track of the number of blank lines added; * While processing each line, we notice if it adds a blank line, and increment the counter, or reset it to zero otherwise; * When actually we apply the data, we remove the empty lines we counted earlier if we are applying it at the end of the file. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions