Class RefDirectoryRename
java.lang.Object
org.eclipse.jgit.lib.RefRename
org.eclipse.jgit.internal.storage.file.RefDirectoryRename
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate ObjectIdThe value of the source reference at the start of the rename.private final RefDirectoryprivate RefDirectoryUpdateA reference we backupobjIdinto during the rename.Fields inherited from class org.eclipse.jgit.lib.RefRename
destination, source -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.jgit.lib.RefRename
disableRefLog, getRefLogIdent, getRefLogMessage, getResult, needToUpdateHEAD, rename, setRefLogIdent, setRefLogMessage
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
refdb
-
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
A reference we backupobjIdinto during the rename.
-
-
Constructor Details
-
RefDirectoryRename
RefDirectoryRename(RefDirectoryUpdate src, RefDirectoryUpdate dst)
-
-
Method Details
-
doRename
Do the actual rename- Specified by:
doRenamein classRefRename- Returns:
- the result of the rename operation.
- Throws:
IOException
-
renameLog
-
rename
-
linkHEAD
-