pijul_org / pijul

#368 Push by default does push to master branch

Opened by porky11, on March 16, 2019
Open
Needs-review
porky11 commented on March 16, 2019

When pushing to a remote, it seems preferable, if the branch is pushed to a branch with the same name in the remote repository by default.\r+ \r + According to the help message, it should be that way:\r + --to-branch <remote_branch> The branch to push into. Defaults to the current branch.\r + \r + But instead it will be pushed to the remote master branch when not specified differently.\r +

AveryLychee commented on March 17, 2019

Relatedly: it might also be helpful to indicate which branch is being pushed to in the UI, so that users are less likely to push to the wrong branch.

iantownsend added a patch:
Add option to fork without switching branches by iantownsend, created on March 18, 2019

AXADqtRgQ1qUV493CL4CfDbVqJmLC8e4pNDEVhcPYWxJWR9kbSMXNeQsaxAwDLrcxN9zEyU6AEvckt5hD315mVDn
latest
master
testing
iantownsend added a patch:
Give more feedback when pushing by iantownsend, created on March 18, 2019

8PpMQtSVXEBufn29EsZf2b1oo5Sn6Y7N4uwwxmC96Zd7hnFCdNhSNKm2HsUpeQS9bHzWKQRh8ZLCN1CZv3CM2QrP
latest
master
testing
iantownsend commented on March 18, 2019

Patches incoming!\r + \r + https://nest.pijul.com/iantownsend/pijul:master/patches/ANxbE59g52SknY6uqr2nEHoC7kpQvtM2kTURB3bPFkuAWgJb8p9MJ7USJnguUohzh2ee1vkGt3WHctRj5kQ64Q1A\r+ \r + This patch makes pijul push push to the current branch instead of the master branch by default.\r + \r + https://nest.pijul.com/iantownsend/pijul:master/patches/8PpMQtSVXEBufn29EsZf2b1oo5Sn6Y7N4uwwxmC96Zd7hnFCdNhSNKm2HsUpeQS9bHzWKQRh8ZLCN1CZv3CM2QrP\r+ \r + This patch addresses AveryLychee's comment by displaying the branch being pushed to.

lthms commented on March 26, 2019

Thanks a lot for your submission! I will try to have a look at that as soon as possible.\r + \r + In practice, your changes seems logical and valuable, I only fear that pijul commands are getting more and more arguments without any high-level conception, which means we might eventually fall into the very same hole git fell into years ago.

lthms added tag
Needs-review
on March 27, 2019
pmeunier commented on March 27, 2019

The "more feedback" patch looks good to me! @lthms, I do see your point for the other one, not for this one. Let's talk about the "fork without switching" in discussion #369.

pmeunier commented on March 30, 2019

Ok, I just applied the "more feedback" patch. I like the other idea (pushing to a branch with the same name), and it is completely feasible (by calling pijul branches on the remote, if there is no default remote branch for the current branch), so I'll leave this discussion open.