Rich Freeman on 30 Jul 2013 03:43:18 -0700

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

[PLUG] Odd Git Behavior

Any git experts want to weigh in on this odd behavior?  For
convenience I'll quote my email to gentoo-dev here:

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

To demonstrate, run:
git clone -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...

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --