Commit a9a3e82
committed
apply: fix copy/rename breakage
7ebd52a (Merge branch 'dz/apply-again', 2008-07-01) taught "git-apply" to
grok a (non-git) patch that is a concatenation of separate patches that
touch the same file number of times, by recording the postimage of patch
application of previous round and using it as the preimage for later
rounds.
This "incremental" mode of patch application fundamentally contradicts
with the way git rename/copy patches are designed. When a git patch talks
about a file A getting modified, and a new file B created out of A, like
this:
diff --git a/A b/A
--- a/A
+++ b/A
... change text here ...
diff --git a/A b/B
copy from A
copy to B
--- a/A
+++ b/B
... change text here ...
the second change to produce B does not depend on what is done to A with
the first change in any way. This is explicitly done so for reviewability
of individual patches.
With this commit, we do not look at 'fn_table' that records the postimage
of previous round when applying a patch to produce a new file out of an
existing file.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 7eef32d commit a9a3e82
2 files changed
+27
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2296 | 2296 | | |
2297 | 2297 | | |
2298 | 2298 | | |
2299 | | - | |
| 2299 | + | |
| 2300 | + | |
2300 | 2301 | | |
2301 | 2302 | | |
2302 | 2303 | | |
| |||
2375 | 2376 | | |
2376 | 2377 | | |
2377 | 2378 | | |
2378 | | - | |
| 2379 | + | |
2379 | 2380 | | |
2380 | 2381 | | |
2381 | 2382 | | |
| |||
2389 | 2390 | | |
2390 | 2391 | | |
2391 | 2392 | | |
2392 | | - | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
2393 | 2396 | | |
2394 | 2397 | | |
2395 | 2398 | | |
| |||
2399 | 2402 | | |
2400 | 2403 | | |
2401 | 2404 | | |
| 2405 | + | |
2402 | 2406 | | |
2403 | 2407 | | |
2404 | 2408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
116 | 136 | | |
117 | 137 | | |
118 | 138 | | |
| |||
0 commit comments