public class ReflogWriter extends Object
Constructor and Description |
---|
ReflogWriter(RefDirectory refdb)
Create writer for ref directory.
|
ReflogWriter(RefDirectory refdb,
boolean forceWrite)
Create writer for ref directory.
|
Modifier and Type | Method and Description |
---|---|
ReflogWriter |
create()
Create the log directories.
|
ReflogWriter |
log(RefUpdate update,
String msg,
boolean deref)
Write the given ref update to the ref's log.
|
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 entry to the ref's log.
|
static String |
refLockFor(String name)
Get the ref name to be used for when locking a ref's log for rewriting.
|
public ReflogWriter(RefDirectory refdb)
refdb
- a RefDirectory
object.public ReflogWriter(RefDirectory refdb, boolean forceWrite)
refdb
- a RefDirectory
object.forceWrite
- true to write to disk all entries logged, false to respect the
repository's config and current log file status.public static String refLockFor(String name)
name
- name of the ref, relative to the Git repository top level
directory (so typically starts with refs/).public ReflogWriter create() throws IOException
IOException
public ReflogWriter log(String refName, ReflogEntry entry) throws IOException
refName
- a String
object.entry
- a ReflogEntry
object.IOException
public ReflogWriter log(String refName, ObjectId oldId, ObjectId newId, PersonIdent ident, String message) throws IOException
refName
- ref nameoldId
- old object idnewId
- new object idident
- a PersonIdent
message
- reflog messageIOException
public ReflogWriter log(RefUpdate update, String msg, boolean deref) throws IOException
update
- a RefUpdate
msg
- reflog messagederef
- whether to dereference symbolic refsIOException
Copyright © 2019 Eclipse JGit Project. All rights reserved.