On Fri, Jan 24, 2025 at 01:24:12PM -0800, Xiyue Deng wrote:
> I would like to echo on this point.  I had worked on a repository that
> has the "master" branch marked as the default branch on Salsa, which
> lacks many changes compared to the released version.  I tried to
> manually incorporate those changes, and only later found out that the
> actual latest branch is "debian/sid" and it did have everything
> up-to-date.  (Note that this has since been fixed[1]).  I think for new
> repository, standardizing on a name (either "debian/latest" or people's
> liking) helps identify where the latest work goes to.

I find myself in this situation from time to time as well.  However, I
disagree with your conclusion.  At least for me, and I'm going to guess
for most contributors, I wouldn't reliably think to look for a
non-default branch at all unless I was doing something a little more out
of the ordinary such as preparing an update for a stable release; it
wouldn't really matter whether that branch was called debian/master or
debian/main or debian/sid or debian/latest.  I usually work on the
assumption that the branch I get by "git clone" from Salsa is the one I
should be working on for the usual case of developing on unstable, and
since that assumption is nearly always correct, it saves me time and
energy over explicitly looking around for different branch names every
time I clone a repository (I work on a lot of different packages).

In the situation you outlined, it wouldn't have mattered to me one bit
whether the actual latest branch was called debian/sid or debian/latest;
I probably wouldn't have noticed it either way.  What would have
mattered to me was that it wasn't the default branch (HEAD on Salsa).

So, rather than worrying about the _name_ of the default branch, I'd
like to suggest a change to DEP-14 that I think would have broader
consensus and be more useful.

Currently, there's only one place where DEP-14 talks about the default
branch: the "Native packages" section says "the default branch of the
repository (as pointed by the HEAD reference) should be a development
branch".  I suggest that this recommendation should not be just for
native packages.  The "For development releases" section should say that
the branch for uploads to the current development release of the
furthest-upstream distribution handled in a given repository (typically
Debian) should be the default branch, as pointed to by the HEAD
reference.

DEP-14 needn't prescribe exactly what the name of that branch should be,
and if it does then we should pragmatically regard it only as an
indication of what tools that _create_ Debian packaging repositories
should do.  Renaming branches is intrusive (it still typically requires
manual action from anyone who has an existing clone and wants to pull
changes!), and so there can be no realistic expectation that existing
repositories will reliably change to follow a new suggested default
name.

-- 
Colin Watson (he/him)                              [cjwat...@debian.org]

Reply via email to