GIT-DEBCHERRY(1)

πŸ’– GIT-DEBCHERRY πŸ’–

okay bestie, so this is a page from the General Commands Manual and it's all about a lil tool called git-debcherry (yes, manual section 1, we're in the big leagues now). Pull up a chair, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

git-debcherry β€” it exports commits that touch upstream source and turns them into patches. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

git-debcherry [options] upstream [integration]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the deal: this program digs through your git history and tries to cook up a set of patches that meet ALL of these conditions, no exceptions, periodt:

  1. It is guaranteed to apply to upstream β€” like, that's non-negotiable πŸ”₯
  2. It produces the same work tree as integration, outside ./debian
  3. It does not touch ./debian β€” hands off, bestie πŸ™…
  4. As much as possible, it matches the git history from upstream to integration

it's giving "carefully curated patch energy" and honestly? obsessed. ✨


πŸŽ€ BRANCH PARAMETERS πŸŽ€

upstream

This ref should be suitable for export as a .orig.tar.gz. And like, real talk: note that quilt has no way of deleting files that does not include the material to be deleted in the patch. So your upstream branch should include any necessary file deletions. πŸ‘‘

integration

This branch contains all the debian packaging, plus any changes introduced to upstream source by the debian packager. This argument is optional (chill, you don't have to pass it). If integration is not passed, git-debcherry will just use HEAD. πŸ’–


πŸ’… OPTIONS πŸ’…

The following options are available, and yes, we're listing every single one:

  • -o, --output-directory directory β€” Place output (patches and series file) in directory. If unspecified, output patches (in mbox format) to stdout. classic.
  • -s, --stat β€” Only output diffstat of patches. just the stats, no full patch drama πŸ“Š
  • -d, --debug β€” Output some debugging information. Probably only useful to developers or those reporting bugs. iykyk πŸ›

🌈 EXAMPLE 🌈

To export the patches between tag v3.0+dfsg1 and the current branch into ./debian/patches:

$ git-debcherry -o debian/patches v3.0+dfsg1

and boom, you're done. slay. πŸ’œ


πŸ“ NOTES πŸ“

PERFORMANCE

git-debcherry currently uses git-filter-branch(1) to rewrite all commits on the integration branch not present upstream. Depending on the number of such commits, this can be noticeably slow. 😭 like, go make a snack, it might be a minute.

DELETED FILES

git-debcherry currently follows dpkg-source(1) in ignoring file deletions. The positive side effect? It doesn't bloat the patches. πŸŽ€ But if you really need the files deleted for build and/or licensing reasons, you should delete them in upstream. no cap.

fr fr, read that last bit twice β€” it's a real caveat, not a vibe.

πŸ”— SEE ALSO πŸ”—

gitpkg(1)


πŸ‘‘ AUTHOR πŸ‘‘

git-debcherry was written by David Bremner <bremner@debian.org>. iconic behaviour, honestly. 🫢


and that's a wrap, bestie! πŸ’– this page is dated April 27, 2014 and it's from the git-debcherry source. go forth and export those patches, you gorgeous genius you. πŸ¦‹βœ¨