History

feat(git-config): add suppport for android

Do not interpolate `~user/` on Android (Termux). There is no meaning of it. It is single user system.

Aditya Alok committed 4 years ago

Commit 031bd2f1 parent 29738ed1 file · +2 −2Browse files

Unified · Split

git-config/src/values.rs+2−2
@@ -196,7 +196,7 @@ impl<'a> From<Cow<'a, [u8]>> for String<'a> { · 195 unmodified lines
196196 pub mod path {
197197 use std::borrow::Cow;
198198
199− #[cfg(not(target_os = "windows"))]
199+ #[cfg(not(any(target_os = "android", target_os = "windows")))]
200200 use pwd::Passwd;
201201 use quick_error::ResultExt;
202202
@@ -275,7 +275,7 @@ pub mod path { · 72 unmodified lines
275275 }
276276 }
277277
278− #[cfg(target_os = "windows")]
278+ #[cfg(any(target_os = "windows", target_os = "android"))]
279279 fn interpolate_user(self) -> Result<Cow<'a, std::path::Path>, interpolate::Error> {
280280 Err(interpolate::Error::UserInterpolationUnsupported)
281281 }