t5516 (fetch-push): fix test restoration

We shouldn't modify the commits; it screws the following tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Add concept of 'publish' branch

The publish branch is the branch the user wants to push to, akin to the
upstream branch, which is the branch the user wants to use as a
baseline. It overrides other configurations, such as push.default, and
remote.<name>.push.

The upstream branch is:

  branch.$name.remote
  branch.$name.merge

The publish branch is:

  branch.$name.pushremote
  branch.$name.push

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
branch: add --set-publish-to option

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
push: add --set-publish option

To setup publish tracking branch, like 'git branch --set-publish'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
branch: display publish branch

It does it along the upstream branch, if any.

* publish ... [master, gh/publish: ahead 1] ...
  master  ... [master, gh/master] ...

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
sha1_name: cleanup interpret_branch_name()

The 'upstream' variable doesn't hold an "upstream", but a branch, so
make it clearer.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
sha1_name: simplify track finding

It's more efficient to check for the braces first.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
sha1_name: add support for @{publish} marks

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>