|
|
|
@ -1,9 +1,10 @@
|
|
|
|
|
use crate::{crash, info, internal::AppExitCode, log};
|
|
|
|
|
use colored::Colorize;
|
|
|
|
|
use std::env;
|
|
|
|
|
use std::process::Command;
|
|
|
|
|
use tabled::Tabled;
|
|
|
|
|
|
|
|
|
|
use crate::{crash, info, internal::AppExitCode, log};
|
|
|
|
|
|
|
|
|
|
// For displaying the table of contents
|
|
|
|
|
#[derive(Clone, tabled::Tabled, Debug)]
|
|
|
|
|
struct RepoDisplayGit {
|
|
|
|
@ -53,7 +54,8 @@ pub fn git_status(verbose: bool, repo: &str, colorblind: bool) -> String {
|
|
|
|
|
let output = String::from_utf8(output.stdout).unwrap();
|
|
|
|
|
log!(verbose, "Git status: {}", output);
|
|
|
|
|
|
|
|
|
|
let unstaged = output.contains("Changes not staged for commit") || output.contains("Changes to be committed");
|
|
|
|
|
let unstaged = output.contains("Changes not staged for commit")
|
|
|
|
|
|| output.contains("Changes to be committed");
|
|
|
|
|
let untracked = output.contains("Untracked files");
|
|
|
|
|
let dirty = unstaged || untracked;
|
|
|
|
|
|
|
|
|
|