Support refs/users/self for the GET branch rest endpoint

A user may fetch the magic branch refs/users/self and this branch is
resolved to the user branch of the calling user
> git fetch origin refs/users/self

This change adds support for this magic ref to the GET Branch rest
endpoint. This only works if the repository is All-Users.

Change-Id: I2d56a8896e0b701351e10e22ba6012ed28d53117
This commit is contained in:
Youssef Elghareeb
2020-10-26 19:02:39 +01:00
parent b7dadde0bf
commit a5639fcef6
6 changed files with 26 additions and 7 deletions

View File

@@ -1702,7 +1702,9 @@ List all branches that match regex `t.*1`:
'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
--
Retrieves a branch of a project.
Retrieves a branch of a project. For the "All-Users" repository, the magic
branch "refs/users/self" is automatically resolved to the user branch of the
calling user.
.Request
----