Interface RefLogIdentityProvider

All Known Implementing Classes:
DefaultRefLogIdentityProvider

public interface RefLogIdentityProvider
Extension point that allows to control which identity should be recorded in the reflog for ref updates done by a user or done on behalf of a user.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the default domain for constructing email addresses if guessing the correct host is not possible.
    default org.eclipse.jgit.lib.PersonIdent
    newRefLogIdent(com.google.common.collect.ImmutableList<IdentifiedUser> users, Instant when, ZoneId zoneId)
    Creates a PersonIdent for 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.PersonIdent
    Creates a PersonIdent for 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.PersonIdent
    Creates a PersonIdent for 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

      default org.eclipse.jgit.lib.PersonIdent newRefLogIdent(IdentifiedUser user)
      Creates a PersonIdent for 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 PersonIdent is created with the current timestamp and the system default timezone.

      Parameters:
      user - the user for which a reflog identity should be created
    • newRefLogIdent

      org.eclipse.jgit.lib.PersonIdent newRefLogIdent(IdentifiedUser user, Instant when, ZoneId zoneId)
      Creates a PersonIdent for 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 created
      when - the timestamp that should be used to create the PersonIdent
      zoneId - the zone ID identifying the timezone that should be used to create the PersonIdent
    • newRefLogIdent

      default org.eclipse.jgit.lib.PersonIdent newRefLogIdent(com.google.common.collect.ImmutableList<IdentifiedUser> users, Instant when, ZoneId zoneId)
      Creates a PersonIdent for 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 BatchUpdate it'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 created
      when - the timestamp that should be used to create the PersonIdent
      zoneId - the zone ID identifying the timezone that should be used to create the PersonIdent
    • getDefaultDomain

      default String getDefaultDomain()
      Returns the default domain for constructing email addresses if guessing the correct host is not possible.