-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Junio C Hamano
committed
May 21, 2007
1 parent
efe7f35
commit 077e1af
Showing
1 changed file
with
15 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters