GitFolder class

Git repository nature.

Detected when a folder contains .git/ directory or .git file (for submodules).

Inheritance

Constructors

GitFolder(FsFolder fsFolder, {required String currentBranch, bool hasUncommittedChanges = false, bool hasUnpushedCommits = false, bool isSubmodule = false, List<String> remotes = const [], String? submoduleName})

Properties

currentBranch String
Current branch name.
final
fsFolder FsFolder
The underlying filesystem folder.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hasUncommittedChanges bool
Whether there are uncommitted changes.
final
hasUnpushedCommits bool
Whether there are commits not pushed to remote.
final
isSubmodule bool
Whether this is a git submodule (has .git file instead of .git/).
final
name String
Folder name (basename of path).
no setterinherited
path String
Absolute path to the folder.
no setterinherited
remotes List<String>
List of configured remotes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
submoduleName String?
Submodule name (if this is a submodule, extracted from parent's .gitmodules).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isGitFolder(String dirPath) bool
Check if a folder is a git repository.
isSubmoduleFolder(String dirPath) bool
Check if this is a submodule (has .git file instead of directory).