Class RefDirectoryRename

java.lang.Object
org.eclipse.jgit.lib.RefRename
org.eclipse.jgit.internal.storage.file.RefDirectoryRename

class RefDirectoryRename extends RefRename
Rename any reference stored by RefDirectory.

This class works by first renaming the source reference to a temporary name, then renaming the temporary name to the final destination reference.

This strategy permits switching a reference like refs/heads/foo, which is a file, to refs/heads/foo/bar, which is stored inside a directory that happens to match the source name.

  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • refdb

      private final RefDirectory refdb
    • objId

      private ObjectId objId
      The value of the source reference at the start of the rename.

      At the end of the rename the destination reference must have this same value, otherwise we have a concurrent update and the rename must fail without making any changes.

    • tmp

      private RefDirectoryUpdate tmp
      A reference we backup objId into during the rename.
  • Constructor Details

  • Method Details