Move git related things into specialized git crate

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Julia 2022-09-28 11:43:33 -04:00
parent bf3b3da6ed
commit d5fd531743
17 changed files with 151 additions and 100 deletions

View file

@ -2,20 +2,13 @@
pub mod test;
use futures::Future;
use lazy_static::lazy_static;
use std::{
cmp::Ordering,
ffi::OsStr,
ops::AddAssign,
pin::Pin,
task::{Context, Poll},
};
lazy_static! {
pub static ref DOT_GIT: &'static OsStr = OsStr::new(".git");
pub static ref GITIGNORE: &'static OsStr = OsStr::new(".gitignore");
}
pub fn truncate(s: &str, max_chars: usize) -> &str {
match s.char_indices().nth(max_chars) {
None => s,