Signed-off-by: Chenxiong Qi cqi@redhat.com
I'm all for being explicit here. I'm not sure this covers all use cases now. As far as I can tell, rpkg allows people to have branches with any name locally as long as they are tracking the correct remote branch.
$ git checkout -b my-branch $ git branch -u master
Now my-branch should work exactly the same as if it was called master. The branch_merge property will actually be master. However, running fedpkg push on my-branch with this patch will ultimately run git push origin master, which may not be what the user wanted.
my-branch
branch_merge
master
fedpkg push
git push origin master
Maybe changing to running git push origin my-branch:master would solve it?
git push origin my-branch:master
rebased
Thanks for pointing out this. Yes. I used wrong git-push format. It's fixed.
I think the PR is in good shape to be merged.
However, I'm slightly worried that no matter how this gets changed, someone will complain that it's broken for them. At the same time, current status of now knowing what *pkg push does is not good either. I'm not aware of any documentation that would say what it actually does push.
*pkg push
Oh, and an alternative solution might be to invoke git with git -c push.default=XXX push. This way there could be some customization. I'm not sure that would be a good idea.
git -c push.default=XXX push
Another choice would be to add
push.default XXX
to clone_config as a default configuration. Then, user is able to change it at any time depending on his/her preference.
clone_config
Yeah, that looks like the best way to solve this.
A new PR for this issue https://pagure.io/fedpkg/pull-request/50
Pull-Request has been closed by cqi
Signed-off-by: Chenxiong Qi cqi@redhat.com