From aa45fae4852080b7f7289408248499b3cecc8169 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 27 Feb 2018 02:46:36 -0500 Subject: add some more profiling verbose output --- src/vcs/git.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/vcs/git.rs') diff --git a/src/vcs/git.rs b/src/vcs/git.rs index 32369a3..74696ec 100644 --- a/src/vcs/git.rs +++ b/src/vcs/git.rs @@ -187,9 +187,16 @@ impl super::VcsInfo for GitInfo { } pub fn detect() -> Option> { - let git = std::env::current_dir() + start_talking_about_time!("git::detect"); + + let pwd = std::env::current_dir(); + talk_about_time!("pwd"); + let git = pwd .ok() .and_then(|pwd| git2::Repository::discover(pwd).ok()); + talk_about_time!("discover"); + + stop_talking_about_time!(); if let Some(git) = git { Some(Box::new(GitInfo::new(&git))) -- cgit v1.2.3-54-g00ecf