diff options
author | qkzk <qu3nt1n@gmail.com> | 2022-12-16 00:02:04 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2022-12-16 00:02:04 +0100 |
commit | b43cbc1ba788674fadc3e3b8244aa25e2626675b (patch) | |
tree | 8e57235fe6f527a5be051c4f1558a8f5399b32d5 /src/git.rs | |
parent | 8f59ffdc608b913cedf870e8b5c9418707303020 (diff) |
massive documentaion and some refactoring.
Diffstat (limited to 'src/git.rs')
-rw-r--r-- | src/git.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -75,6 +75,8 @@ fn parse_porcelain2(data: String) -> Option<GitStatus> { Some(status) } +/// Returns a string representation of the git status of this path. +/// Will return an empty string if we're not in a git repository. pub fn git(path: &Path) -> Result<String, Box<dyn Error>> { if std::env::set_current_dir(path).is_err() { // The path may not exist. It should never happen. |