|
|
@ -1,9 +1,10 @@
|
|
|
|
use crate::{crash, info, internal::AppExitCode, log};
|
|
|
|
|
|
|
|
use colored::Colorize;
|
|
|
|
use colored::Colorize;
|
|
|
|
use std::env;
|
|
|
|
use std::env;
|
|
|
|
use std::process::Command;
|
|
|
|
use std::process::Command;
|
|
|
|
use tabled::Tabled;
|
|
|
|
use tabled::Tabled;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use crate::{crash, info, internal::AppExitCode, log};
|
|
|
|
|
|
|
|
|
|
|
|
// For displaying the table of contents
|
|
|
|
// For displaying the table of contents
|
|
|
|
#[derive(Clone, tabled::Tabled, Debug)]
|
|
|
|
#[derive(Clone, tabled::Tabled, Debug)]
|
|
|
|
struct RepoDisplayGit {
|
|
|
|
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();
|
|
|
|
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") || 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 untracked = output.contains("Untracked files");
|
|
|
|
let dirty = unstaged || untracked;
|
|
|
|
let dirty = unstaged || untracked;
|
|
|
|
|
|
|
|
|
|
|
|