#945994 dgit-maint-merge(7) should talk about pushing to salsa

#945994#5
Date:
2019-12-02 14:07:23 UTC
From:
To:
Hi,

It would be nice if dgit-maint-merge(7) provided more advice on
pushing to salsa, specifically:

The various setup sections do describe e.g.
           % git push --follow-tags -u origin master

...and while this is nice, it should (I think) be possible to provide
git config runes so that git push does what you wanted by default -
git-push(1) alludes to this:

When the command line does not specify what to push with <refspec>...
arguments or --all, --mirror, --tags options, the command finds the
default <refspec> by consulting remote.*.push configuration

BUILDING AND UPLOADING should also mention pushing to salsa

[I mentioned this to Ian on IRC, and they weren't sure if
--follow-tags was always the right answer]

Thanks,

Matthew

#945994#10
Date:
2019-12-02 15:52:36 UTC
From:
To:
Hello Matthew,

Actually, the '-u' in that command alters your .git/config such that a
subsequent plain `git push` will push master to salsa.


Yes.

#945994#15
Date:
2019-12-02 16:50:22 UTC
From:
To:
Yes, but unless I am terminally confused about git, if I want to be
pushing two branches (e.g. upstream and master) then this doesn't DWIW?

Ah, yes, that might be a problem. But, for example, I will always want
to push these tags to salsa, so maybe something on a per-remote basis?

No.

Regards,

Matthew

#945994#20
Date:
2019-12-02 20:22:14 UTC
From:
To:
control: tag -1 +patch

Hello Matthew,

Ah, indeed.  In the case where you are forced to maintain an upstream
branch on salsa (the case where upstream releases only tarballs), `git
push` alone will not be sufficient.

If there is a way to configure git to always push both master and
upstream to salsa when you type `git push` from one of those branches,
and not push anything to other remotes, the manpage could document how
to do that.  I'm not sure that it's actually possible to do this.

(I think that setting remote.origin.push so that master and upstream get
pushed to salsa if you type `git push origin` is not much of an
improvement over `git push origin master upstream`?)

However, I don't think this should be recommended strongly by the
manpage.  I think that it would be quite unusual to configure git such
that a plain `git push` would push more than one branch, such that it
would be surprising to most git users for git ever to do that.

We should have mention of pushing 'master' (and 'upstream' if you have
it) to salsa, in the "BUILDING & UPLOADING" section, probably in prose
form.

It doesn't look like it can be set per-remote.

I think that it would be good to mention the push.followTags setting as
something the user might want to set, without strongly recommending it.