From f8d337ad299dfc557e80716ce4c96b4ac70a62dd Mon Sep 17 00:00:00 2001 From: Barnaby Keene Date: Wed, 9 Oct 2019 08:42:36 +0100 Subject: [PATCH] chore: omit the entire git.rs file when starship is used --- src/git.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git.rs b/src/git.rs index 5008ebfcd..2dc4aa0d8 100644 --- a/src/git.rs +++ b/src/git.rs @@ -1,7 +1,8 @@ +#![cfg(not(feature = "starship-prompt"))] + use git2::{Repository, RepositoryOpenFlags}; use std::ffi::OsString; -#[cfg(not(feature = "starship-prompt"))] pub fn current_branch() -> Option { let v: Vec = vec![]; match Repository::open_ext(".", RepositoryOpenFlags::empty(), v) {