Interface RefLogIdentityProvider
- All Known Implementing Classes:
DefaultRefLogIdentityProvider
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the default domain for constructing email addresses if guessing the correct host is not possible.default org.eclipse.jgit.lib.PersonIdentnewRefLogIdent(com.google.common.collect.ImmutableList<IdentifiedUser> users, Instant when, ZoneId zoneId) Creates aPersonIdentfor the given users that should be used as the user identity in the reflog for ref updates done by these users or done on behalf of these users.default org.eclipse.jgit.lib.PersonIdentnewRefLogIdent(IdentifiedUser user) Creates aPersonIdentfor the given user that should be used as the user identity in the reflog for ref updates done by this user or done on behalf of this user.org.eclipse.jgit.lib.PersonIdentnewRefLogIdent(IdentifiedUser user, Instant when, ZoneId zoneId) Creates aPersonIdentfor the given user that should be used as the user identity in the reflog for ref updates done by this user or done on behalf of this user.
-
Method Details
-
newRefLogIdent
Creates aPersonIdentfor the given user that should be used as the user identity in the reflog for ref updates done by this user or done on behalf of this user.The returned
PersonIdentis created with the current timestamp and the system default timezone.- Parameters:
user- the user for which a reflog identity should be created
-
newRefLogIdent
Creates aPersonIdentfor the given user that should be used as the user identity in the reflog for ref updates done by this user or done on behalf of this user.- Parameters:
user- the user for which a reflog identity should be createdwhen- the timestamp that should be used to create thePersonIdentzoneId- the zone ID identifying the timezone that should be used to create thePersonIdent
-
newRefLogIdent
default org.eclipse.jgit.lib.PersonIdent newRefLogIdent(com.google.common.collect.ImmutableList<IdentifiedUser> users, Instant when, ZoneId zoneId) Creates aPersonIdentfor the given users that should be used as the user identity in the reflog for ref updates done by these users or done on behalf of these users.Usually ref updates are done by a single user or on behalf of a single user, but with
BatchUpdateit's possible that updates of different users are batched together into a single ref update.If a single user is provided or all provided users reference the same account a reflog identity for that user/account is created and returned.
If multiple users (that reference different accounts) are provided a shared reflog identity is created and returned. The shared reflog identity lists all involved accounts. How the shared reflog identity looks like doesn't matter much, as long as it's not the reflog identity of a real user (e.g. if impersonated updates of multiple users are batched together it must not be the reflog identity of the real user).
- Parameters:
users- the users for which a reflog identity should be createdwhen- the timestamp that should be used to create thePersonIdentzoneId- the zone ID identifying the timezone that should be used to create thePersonIdent
-
getDefaultDomain
Returns the default domain for constructing email addresses if guessing the correct host is not possible.
-