author | Michał Kiedrowicz <michal.kiedrowicz@gmail.com> | |
Sat, 11 Apr 2009 19:31:00 +0000 (21:31 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Apr 2009 20:46:58 +0000 (13:46 -0700) | ||
commit | e8141fcf54b4e8c2c12300da1ad1bc3573a4e204 | |
tree | 1df098f9353e26a422897ff01741ff91f6afeadb | tree | snapshot |
parent | 1d49f0d1a1b7b2941e56cf8384a7a4267e98150c | commit | diff |
builtin-apply: keep information about files to be deleted
Example correct diff generated by `diff -M -B' might look like this:
diff --git a/file1 b/file2
similarity index 100%
rename from file1
rename to file2
diff --git a/file2 b/file1
similarity index 100%
rename from file2
rename to file1
Information about removing `file2' comes after information about creation
of new `file2' (renamed from `file1'). Existing implementation isn't able to
apply such patch, because it has to know in advance which files will be
removed.
This patch populates fn_table with information about removal of files
before calling check_patch() for each patch to be applied.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Example correct diff generated by `diff -M -B' might look like this:
diff --git a/file1 b/file2
similarity index 100%
rename from file1
rename to file2
diff --git a/file2 b/file1
similarity index 100%
rename from file2
rename to file1
Information about removing `file2' comes after information about creation
of new `file2' (renamed from `file1'). Existing implementation isn't able to
apply such patch, because it has to know in advance which files will be
removed.
This patch populates fn_table with information about removal of files
before calling check_patch() for each patch to be applied.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c | diff | blob | history | |
t/t4130-apply-criss-cross-rename.sh | diff | blob | history |