Top Description Inners Fields Constructors Methods
org.eclipse.jgit.internal.storage.file

public Class FileCommitGraph

extends Object
Class Inheritance
Imports
java.io.File, .FileNotFoundException, .IOException, java.text.MessageFormat, java.util.concurrent.atomic.AtomicReference, org.eclipse.jgit.annotations.NonNull, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.internal.storage.commitgraph.CommitGraphFormatException, .CommitGraphLoader, .CommitGraph, org.eclipse.jgit.lib.Constants, org.slf4j.Logger, .LoggerFactory

Traditional file system for commit-graph.

This is the commit-graph file representation for a Git object database. Each call to FileCommitGraph#get() will recheck for newer versions.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final AtomicReference<FileCommitGraph.GraphSnapshot>
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv
FileCommitGraph(File
the location of the objects directory.
objectsDir
)

Initialize a reference to an on-disk commit-graph.

Method Summary

Modifier and TypeMethod and Description
pack-priv CommitGraph

Returns:

commit-graph or null if commit-graph file does not exist or corrupt.
get
()

The method will first scan whether the ".git/objects/info/commit-graph" has been modified, if so, it will re-parse the file, otherwise it will return the same result as the last time.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseGraphback to summary
private final AtomicReference<FileCommitGraph.GraphSnapshot> baseGraph
LOGback to summary
private static final Logger LOG

Constructor Detail

FileCommitGraphback to summary
pack-priv FileCommitGraph(File objectsDir)

Initialize a reference to an on-disk commit-graph.

Parameters
objectsDir:File

the location of the objects directory.

Method Detail

getback to summary
pack-priv CommitGraph get()

The method will first scan whether the ".git/objects/info/commit-graph" has been modified, if so, it will re-parse the file, otherwise it will return the same result as the last time.

Returns:CommitGraph

commit-graph or null if commit-graph file does not exist or corrupt.

org.eclipse.jgit.internal.storage.file back to summary

private final Class FileCommitGraph.GraphSnapshot

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.internal.storage.file.FileCommitGraph.GraphSnapshot

Field Summary

Modifier and TypeField and Description
private final File
private final CommitGraph
private final FileSnapshot

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
GraphSnapshot(File file, FileSnapshot snapshot, CommitGraph graph)

Method Summary

Modifier and TypeMethod and Description
pack-priv CommitGraph
private static CommitGraph
open(File file)

pack-priv FileCommitGraph.GraphSnapshot
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileback to summary
private final File file
graphback to summary
private final CommitGraph graph
snapshotback to summary
private final FileSnapshot snapshot

Constructor Detail

GraphSnapshotback to summary
pack-priv GraphSnapshot(File file)
GraphSnapshotback to summary
pack-priv GraphSnapshot(File file, FileSnapshot snapshot, CommitGraph graph)

Method Detail

getCommitGraphback to summary
pack-priv CommitGraph getCommitGraph()
openback to summary
private static CommitGraph open(File file)
refreshback to summary
pack-priv FileCommitGraph.GraphSnapshot refresh()