1 |
I figure this is half-on-topic for this list since I'm trying to |
2 |
prepare patch sets for a package. I'm getting fairly bizarre behavior |
3 |
from git format-patch - patches that don't apply, and patches numbered |
4 |
early in sequence that didn't show up previously in this branch. I |
5 |
suspect rebasing might be the cause of that change, but I don't think |
6 |
it fully explains this behavior. |
7 |
|
8 |
To demonstrate, run: |
9 |
git clone https://github.com/MythTV/mythtv.git -b fixes/0.26 |
10 |
cd mythtv/ |
11 |
git format-patch v0.26.0 |
12 |
mv *.patch .. |
13 |
git checkout v0.26.0 |
14 |
patch -p0 < ../0001-* |
15 |
|
16 |
Final output is: |
17 |
can't find file to patch at input line 17 |
18 |
(messing with -p doesn't help, which will be obvious from a quick |
19 |
inspection of the file vs the tree) |
20 |
|
21 |
How can git format-patch against a tag generate a patch that won't |
22 |
apply against that tag? |
23 |
|
24 |
If you look at the git log of that branch you'll find that the first |
25 |
patch is from a commit that is more distant in the past than the tag. |
26 |
|
27 |
Am I relying on undefined behavior? This has generated useful patches |
28 |
for me in the past... |
29 |
|
30 |
Rich |