Package org.eclipse.jgit.lfs.internal
Class LfsConfig
- java.lang.Object
-
- org.eclipse.jgit.lfs.internal.LfsConfig
-
public class LfsConfig extends Object
Encapsulate access to the.lfsconfig
.According to the git lfs documentation the order to find the
.lfsconfig
file is:- in the root of the working tree
- in the index
- in the HEAD; for bare repositories this is the only place that is searched
Values from the
.lfsconfig
are used only if not specified in another git config file to allow local override without modifiction of a committed file.- See Also:
- Configuration options for git-lfs
-
-
Constructor Summary
Constructors Constructor Description LfsConfig(Repository db)
Create a new instance of the LfsConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getString(String section, String subsection, String name)
Get string value or null if not found.
-
-
-
Constructor Detail
-
LfsConfig
public LfsConfig(Repository db)
Create a new instance of the LfsConfig.- Parameters:
db
- the associated repo
-
-
Method Detail
-
getString
@Nullable public String getString(String section, String subsection, String name) throws IOException
Get string value or null if not found. First tries to find the value in the git config files. If not found tries to find data in .lfsconfig.- Parameters:
section
- the sectionsubsection
- the subsection for the valuename
- the key name- Returns:
- a String value from the config,
null
if not found - Throws:
IOException
-
-