On Mon, Jul 29, 2013 at 8:03 PM, Rich Freeman <ri...@gentoo.org> wrote: > I figure this is half-on-topic for this list since I'm trying to > prepare patch sets for a package. I'm getting fairly bizarre behavior > from git format-patch - patches that don't apply, and patches numbered > early in sequence that didn't show up previously in this branch. I > suspect rebasing might be the cause of that change, but I don't think > it fully explains this behavior. > > To demonstrate, run: > git clone https://github.com/MythTV/mythtv.git -b fixes/0.26 > cd mythtv/ > git format-patch v0.26.0 > mv *.patch .. > git checkout v0.26.0 > patch -p0 < ../0001-* > > Final output is: > can't find file to patch at input line 17 > (messing with -p doesn't help, which will be obvious from a quick > inspection of the file vs the tree) > > How can git format-patch against a tag generate a patch that won't > apply against that tag? > > If you look at the git log of that branch you'll find that the first > patch is from a commit that is more distant in the past than the tag. > > Am I relying on undefined behavior? This has generated useful patches > for me in the past... >
Try applying the patches with patch -p1.