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

Re: git and quilt

John Goerzen wrote:
> On Wed, Feb 03, 2010 at 04:25:40PM -0600, Matt Zagrabelny wrote:
>> I am using git with no debian/patches (quilt/dpatch) to manage the cdpr
>> package.
> I am doing the same, for the very simple reason that every other
> approach I've seen violates the KISS (Keep It Simple, Stupid)
> principle.

> I am not a fan of git-rebase due in part to the difficulty of working
> with others, but also in part due to the difficulty of tracking how
> your differences from upstream change over time.  All the
> debian/patches systems I have seen suffer from both of these flaws.

I don’t strongly disagree, but consider for a moment a method that
tries to work around these flaws.  It uses dpkg source format
3.0 (quilt).

There are three branches: master, upstream, and upstream+patches.

 - master:		patched source (including debian/ dir)
 - upstream:		upstream source
 - upstream+patches:	patched source (w/o debian/ dir)

upstream+patches is rebuilt for each new upstream version by
cherry-picking the relevant commits.  I haven’t scripted this, but
it would not be hard to.

This method has a few advantages:

 - upstream can pull directly from you if they like all your patches
 - you can work on and test the patched source by building off of the
   upstream+patches branch
 - it is easy for others to find your patches, in a form that does not
   require any forward porting.
 - if you generate your debian/patches directory with git format-patch,
   dpkg will check that master and upstream+patches tell the same story.

If you don’t mind the occasional duplicate commit, for new fixes you
can work against upstream+patches and then merge it into master, though
I don’t do this.

FWIW I have been using this method and it’s not so bad.


Reply to: