Added checking for uncomitted added changes for dirty check

main
Michal 2 years ago
parent 4ff5f32222
commit 7d173e119d

@ -53,7 +53,7 @@ pub fn git_status(verbose: bool, repo: &str, colorblind: bool) -> String {
let output = String::from_utf8(output.stdout).unwrap(); let output = String::from_utf8(output.stdout).unwrap();
log!(verbose, "Git status: {}", output); log!(verbose, "Git status: {}", output);
let unstaged = output.contains("Changes not staged for commit"); let unstaged = output.contains("Changes not staged for commit") || output.contains("Changes to be committed");
let untracked = output.contains("Untracked files"); let untracked = output.contains("Untracked files");
let dirty = unstaged || untracked; let dirty = unstaged || untracked;

Loading…
Cancel
Save