public class ReflogWriter extends Object
| Constructor | Description |
|---|---|
ReflogWriter(Repository repository) |
Create write for repository
|
ReflogWriter(Repository repository,
boolean forceWrite) |
Create write for repository
|
| Modifier and Type | Method | Description |
|---|---|---|
ReflogWriter |
create() |
Create the log directories
|
Repository |
getRepository() |
Get repository that reflog is being written for
|
ReflogWriter |
log(String refName,
ObjectId oldId,
ObjectId newId,
PersonIdent ident,
String message) |
Write the given entry information to the ref's log
|
ReflogWriter |
log(String refName,
ReflogEntry entry) |
Write the given
ReflogEntry entry to the ref's log |
ReflogWriter |
log(RefUpdate update,
String msg,
boolean deref) |
Write the given ref update to the ref's log
|
File |
logFor(String name) |
Locate the log file on disk for a single reference name.
|
static String |
refLockFor(String name) |
Get the ref name to be used for when locking a ref's log for rewriting
|
public ReflogWriter(Repository repository)
repository - public ReflogWriter(Repository repository, boolean forceWrite)
repository - forceWrite - true to write to disk all entries logged, false to respect the
repository's config and current log file statuspublic static String refLockFor(String name)
name - name of the ref, relative to the Git repository top level
directory (so typically starts with refs/).public Repository getRepository()
public ReflogWriter create() throws IOException
IOExceptionpublic File logFor(String name)
name - name of the ref, relative to the Git repository top level
directory (so typically starts with refs/).public ReflogWriter log(String refName, ReflogEntry entry) throws IOException
ReflogEntry entry to the ref's logrefName - entry - IOExceptionpublic ReflogWriter log(String refName, ObjectId oldId, ObjectId newId, PersonIdent ident, String message) throws IOException
refName - oldId - newId - ident - message - IOExceptionpublic ReflogWriter log(RefUpdate update, String msg, boolean deref) throws IOException
update - msg - deref - IOExceptionCopyright © 2018. All rights reserved.