Douglas Muth on 30 Jul 2013 08:18:20 -0700

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

Re: [PLUG] Odd Git Behavior

On Mon, Jul 29, 2013 at 9:15 PM, Rich Freeman <> wrote:
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)


I used git and was able to reproduce this from the instructions you gave above.  As far as I can tell, you are using format-patch properly.  The non-existant filename issue is a little disturbing.

I also tried format-patch with the --stdout option and ran into the same issue.

If I were going to troubleshoot this further, I'd consider doing the following:

- Create a new repo
- Create a few "hello world" commits
- Create a few tags with additional commits in each
- Create a patch file from one branch to another and see if you encounter the same or similar behavior
- Try rebasing and see what happens.

-- Doug

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