forked from extern/nushell
chore: omit the entire git.rs file when starship is used
This commit is contained in:
parent
47150efc14
commit
f8d337ad29
@ -1,7 +1,8 @@
|
|||||||
|
#![cfg(not(feature = "starship-prompt"))]
|
||||||
|
|
||||||
use git2::{Repository, RepositoryOpenFlags};
|
use git2::{Repository, RepositoryOpenFlags};
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
|
|
||||||
#[cfg(not(feature = "starship-prompt"))]
|
|
||||||
pub fn current_branch() -> Option<String> {
|
pub fn current_branch() -> Option<String> {
|
||||||
let v: Vec<OsString> = vec![];
|
let v: Vec<OsString> = vec![];
|
||||||
match Repository::open_ext(".", RepositoryOpenFlags::empty(), v) {
|
match Repository::open_ext(".", RepositoryOpenFlags::empty(), v) {
|
||||||
|
Loading…
Reference in New Issue
Block a user