bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-patch] BUG? merge don't detect already merged hunk


From: Bert Wesarg
Subject: [bug-patch] BUG? merge don't detect already merged hunk
Date: Wed, 17 Feb 2010 22:30:03 +0100

Hi all,

the merge algorithm does not detect an already merged hunk, if the
hunk is an append-only diff (i.e. lines adding at the end of he
original file).

Try this:

$ seq 5 > a
$ seq 8 > b
$ diff -u a b | patch -f b
patching file b
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file b.rej
$ diff -u a b | patch --merge -f b
patching file b
Hunk #1 merged at 6-8.
$ cat b
1
2
3
4
5
6
7
8
6
7
8

As you can see, the merge just inserts the lines.

Regards,
Bert




reply via email to

[Prev in Thread] Current Thread [Next in Thread]