Skip to content

git-merge-file: do not add LF at EOF while applying unrelated change

Max Kirillov git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t6023-merge-file.sh: fix and mark as broken invalid testst/t6023-merge-file.sh+3 -30 replies
2/2git-merge-file: do not add LF at EOF while applying unrelated changet/t6023-merge-file.sh xdiff/xmerge.c+68 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] git-merge-file: do not add LF at EOF while applying unrelated change

Hi.

I have noticed that cherry-pick adds trailing newlines when it is not expected to - the change does not contain its addition. Here is the fix for it.

The fix is quite debugging-driven, without detailed analysis of how exactly this "add_nl" parameter works in all cases. But it passes all tests. I have added some more where I felt there were not enough.

Also I have noticed that some tests in the t6023, which related to the behavior contain a mistake which makes them meaningless. I have fixed it and marked the tests as expected failure, because they are failing after that. Hopely they will be fixed some day.

Max Kirillov (2):
t6023-merge-file.sh: fix and mark as broken invalid tests
git-merge-file: do not add LF at EOF while applying unrelated change

 t/t6023-merge-file.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++---
 xdiff/xmerge.c        |  4 +--
 2 files changed, 71 insertions(+), 5 deletions(-)
Signature · 1 line
2.0.0.526.g5318336