How do you create a patch in this case?

Christian Stimming stimming at tuhh.de
Fri May 28 02:42:19 EDT 2010


Am Tuesday 25 May 2010 schrieb Derek Atkins:
> > If I create a patch of Bug #1, which modified a file, say
> > 'Makefile.am'. Then I sent the patch to bugzilla, and I moved on
> > another topic, which is Bug #2. I fixed it and it also modified the
> > same file touched by patch of Bug #1, say 'Makefile.am' again. At the
> > time I creating the patch for Bug #2, the patch for Bug #1 haven't
> > been committed into trunk. So, what should I do to create the patch
> > for Bug #2?
> > 
> > There are 2 cases in such situation:
> > 
> > 1) The Bug #2 depends on the Bug #1, which the patch should be applied
> > after the patch for #1 applied.
> > 
> > 2) The Bug #2 is independent of Bug #1, however, the modified lines
> > are close enough, like adjacent line, which will make it different for
> > patch against bug#1 and patch against the trunk HEAD.
> > 
> > Does Git help in such case? How you guys managed the patches and the
> > working copy? Thanks.
> 
> I don't know if Git will help here.  Some people use something called
> quilt.  But if it requires overlapping patches you're going to require
> some merging by hand or a "apply X before Y" statement.

Agreed. If the patches are applied in the wrong ordering, git will complain 
just as if the patches are applied manually. The only thing which is really 
helpful is to write "apply X before Y" very clearly in the comments.

Regards,

Christian


More information about the gnucash-devel mailing list