Package org.eclipse.jgit.pgm.debug
Class RebuildCommitGraph
java.lang.Object
org.eclipse.jgit.pgm.TextBuiltin
org.eclipse.jgit.pgm.debug.RebuildCommitGraph
Recreates a repository from another one's commit graph.
Do not run this on a repository unless you want to destroy it.
To create the input files, in the source repository use:
git for-each-ref >in.refs git log --all '--pretty=format:%H %ct %P' >in.dag
Run the rebuild in either an empty repository, or a clone of the source. Any missing commits (which might be the entire graph) will be created. All refs will be modified to match the input exactly, which means some refs may be deleted from the current repository.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jgit.pgm.TextBuiltin
TextBuiltin.TerminatedByHelpException
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) File
private final ProgressMonitor
(package private) boolean
private static final String
(package private) File
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
private void
private void
protected void
run()
Perform the actions of this command.Methods inherited from class org.eclipse.jgit.pgm.TextBuiltin
containsHelp, die, die, die, die, execute, getErrorWriter, getOutputWriter, getRepository, getResourceBundle, init, initRaw, parseArguments, printUsage, printUsageAndExit, printUsageAndExit, requiresRepository
-
Field Details
-
Constructor Details
-
RebuildCommitGraph
RebuildCommitGraph()
-
-
Method Details
-
run
Perform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[])
.- Specified by:
run
in classTextBuiltin
- Throws:
Exception
- an error occurred while processing the command. The main framework will catch the exception and print a message on standard error.
-
recreateCommitGraph
- Throws:
IOException
-
detachHead
- Throws:
IOException
-
deleteAllRefs
- Throws:
Exception
-
recreateRefs
- Throws:
Exception
-
computeNewRefs
- Throws:
IOException
-