threads / rfc / 37001

[BUG/RFC] cherry-pick adds newline to last line of file

Subject: [BUG/RFC] cherry-pick adds newline to last line of file

## tl;dr

One message between Jun 26, 2014 and Jun 26, 2014.

replies: 0people: 1as markdown or json

Max Kirillov· Jun 26, 2014, 09:30 UTC · lore
Hi.

If a file does not contain newline in the last line, and the file has changed somewhere in other branch, and the newline has not been not added in that change, when I cherry-pick the commit, the commit does contain the newline in the last line. This sometimes leads to conflict and in general looks unexpected.

Such files are not uncommon nowadays and however bad it is, I think merging and cherry-picking should try to keep is as long as the newline is not added in some of the changes. Are there any option to preserve the absence of the closing newline? Or maybe the commands should preserve it unconditionally?

-- 
Max

← back to recent threads