diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-12-06 08:45:57 -0500 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-12-06 08:45:57 -0500 |
commit | ea8ac6d5bc2b935b75fc9f21d96b9888b4654005 (patch) | |
tree | ce031f0012439c08e42dd4074276c2cb0dd6809e | |
parent | 0acbc475d6172ca128d42f6a51eba69960c6b2c5 (diff) |
Don't inspect calling processes824-slowness-investigation
-rw-r--r-- | src/utils/process.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils/process.rs b/src/utils/process.rs index 65796808..cea79cf5 100644 --- a/src/utils/process.rs +++ b/src/utils/process.rs @@ -7,11 +7,17 @@ use lazy_static::lazy_static; #[derive(Clone, Debug, PartialEq)] pub enum CallingProcess { + #[allow(unused)] GitDiff(CommandLine), + #[allow(unused)] GitShow(CommandLine, Option<String>), // element 2 is file extension + #[allow(unused)] GitLog(CommandLine), + #[allow(unused)] GitReflog(CommandLine), + #[allow(unused)] GitGrep(CommandLine), + #[allow(unused)] OtherGrep, // rg, grep, ag, ack, etc } // TODO: Git blame is currently handled differently @@ -35,9 +41,10 @@ pub fn calling_process() -> Option<Cow<'static, CallingProcess>> { } lazy_static! { - static ref CACHED_CALLING_PROCESS: Option<CallingProcess> = determine_calling_process(); + static ref CACHED_CALLING_PROCESS: Option<CallingProcess> = None; } +#[allow(unused)] fn determine_calling_process() -> Option<CallingProcess> { calling_process_cmdline(ProcInfo::new(), describe_calling_process) } @@ -197,6 +204,7 @@ where // Given `--aa val -bc -d val e f -- ...` return // ({"--aa"}, {"-b", "-c", "-d"}) +#[allow(unused)] fn parse_command_line<'a>(args: impl Iterator<Item = &'a str>) -> CommandLine { let mut long_options = HashSet::new(); let mut short_options = HashSet::new(); |