Support fetch of refs/users/self from All-Users repository

Allow a user to fetch its refs/users/YY/XXXXXXX branch as
refs/users/self. The user branch contains the sharded account ID in
the ref name, but this is an implementation detail that should be
hidden from the user. On the other hand users should be able to access
their user branch easily.

Change-Id: I0f5a9f1456a86873ff91ad418aa60b1eee568109
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-05-02 13:53:41 +02:00
parent 136aab1f0a
commit d3eb8fc937
5 changed files with 60 additions and 4 deletions

View File

@@ -33,6 +33,9 @@ public class RefNames {
/** Preference settings for a user {@code refs/users} */
public static final String REFS_USERS = "refs/users/";
/** Magic user branch in All-Users {@code refs/users/self} */
public static final String REFS_USERS_SELF = "refs/users/self";
/** Default user preference settings */
public static final String REFS_USERS_DEFAULT = RefNames.REFS_USERS + "default";