rmuslimov / browse-at-remote

Browse target page on github/bitbucket from emacs buffers
233 stars 54 forks source link

Cope with pushRemote branches #25

Closed ieure closed 7 years ago

ieure commented 8 years ago

This PR updates browse-at-remote to attempt the pushRemote configured branch for browsing, before falling back to the upstream tracking branch.

rmuslimov commented 8 years ago

@ieure Can you please share information/link where I can read about that config value that you're pulling here. thanks

ieure commented 8 years ago

Git allows you to configure a pushRemote in a addition to a remote, which defines where your commits are pushed to. This is a useful setup for workflows with a shared gold repository, where you push your changes into private forks. It's possible to have any combination of remote and push remote (both / either / none). Currently, when you have a pushRemote defined, but no remote, browse-at-remote won't send you to the pushRemote. This PR fixes that.

The git-config(1) man page has more:

branch..pushRemote When on branch <name>, it overrides branch.<name>.remote for pushing. It also overrides remote.pushDefault for pushing from branch <name>. When you pull from one place (e.g. your upstream) and push to another place (e.g. your own publishing repository), you would want to set remote.pushDefault to specify the remote to push to for all branches, and use this option to override it for a specific branch.

ieure commented 7 years ago

Did you have other feedback on this, or can it be merged?

rmuslimov commented 7 years ago

@ieure Sorry, I forgot about this issue