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.
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private ObjectId | objId
The value of the source reference at the start of the rename. |
| private final RefDirectory | |
| private RefDirectoryUpdate |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected RefUpdate. | |
| protected RefDirectory | |
| private boolean | |
| private static boolean | |
| private boolean |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| objId | back to summary |
|---|---|
| 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. | |
| refdb | back to summary |
|---|---|
| private final RefDirectory refdb | |
| tmp | back to summary |
|---|---|
| private RefDirectoryUpdate tmp A reference we backup | |
| RefDirectoryRename | back to summary |
|---|---|
| pack-priv RefDirectoryRename(RefDirectoryUpdate src, RefDirectoryUpdate dst) | |
| doRename | back to summary |
|---|---|
| protected RefUpdate. Implements abstract org. Doc from org. Do the actual rename
| |
| getRefDirectory | back to summary |
|---|---|
| protected RefDirectory getRefDirectory() Get the ref directory associated with this rename.
| |
| linkHEAD | back to summary |
|---|---|
| private boolean linkHEAD(RefUpdate target) | |
| rename | back to summary |
|---|---|
| private static boolean rename(File src, File dst) | |
| renameLog | back to summary |
|---|---|
| private boolean renameLog(RefUpdate src, RefUpdate dst) | |