(moving this subthread to the bug where the rest of this conversation
is)
Sean Whitton writes ("Re: [PATCH FYI 3/5] git-debpush: Push refs/heads/upstream
too, when appropriate"):
> Ian Jackson [03/Aug 12:18am +01] wrote:
> > + case "$upstream_tag" in
> > + upstream/*) ;;
> > + *) return ;;
> > + esac
>
> Hmm, I'm not sure why you picked the upstream/ convention here.
This is an attempt to distinguish the following scenarios:
1. We are working off upstream git. The upstream git tag named in
the debian/ tag2upload tag references an upstream commit directly.
In this sceanrio, there isn't necessarily any branch on salsa that
corresponds to the upstream git branch. Normally, the upstream
git is simply remote tracking branches on each maintainer's
machine. New git upstream versions are obtained from upstream.
There is no need to push upstream git history to salsa as a
branch; the tag is sufficient.
The user may have create a local `upstream` branch but its
contents are not well-defined and pushing it to salsa would be
surprising.
2. The maintainer is using gbp import-orig.
The "upstream" branch is not actually what we would think of as an
upstream branch. It's a branch of Debian-specific tarball
imports. It may or may not be based on upstream history, but it
is a genuine, separate, fast-forwarding, branch, whose canonical
location is the salsa upstream branch.
In this case, gbp import-orig makes an upstream/ tag. But pushing
that is not sufficient because a subsequent maintainer wants to
make their next import fast forward from the previous one.
3. We're using a git-first workflow, but need to filtering (eg, DFSG
filtering).
In this case we probably have a separate upstream branch, where
the DFSG filtering is done (maybe just by merging from upstream).
We can't use the upstream tags directly. Instead we must make
+dfsg tags, presumably called upstram/... according to DEP-14.
Updates to the upstream branch ought to be pushed to salsa.
Or to put it another way, the `upstream` branch is part of DEP-14's
ideas about upstream source code handling, just like the
upstream/... tag.
We need to push the upstream branch if it is a separate branch from
plain upstream git history (which one doesn't typically manually
mirror ad-hoc as real branch).
I don't think thsi is completely perfect but ultimately we need to do
a bit of guessing about the user's git branch practices.
> Most gbp-maintained packages don't use it, I think.
Personally I don't think I have any idea what "most packages" do. The
use of gbp import-orig seems (unfortunately) extremely common, and
that *does* always create these upstream/ tags.
Thanks,
Ian.
--
Ian Jackson <[email protected]> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.