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
196pub mod path {196pub mod path {
197 use std::borrow::Cow;197 use std::borrow::Cow;
198 198
199 #[cfg(not(target_os = "windows"))]199 #[cfg(not(any(target_os = "android", target_os = "windows")))]
200 use pwd::Passwd;200 use pwd::Passwd;
201 use quick_error::ResultExt;201 use quick_error::ResultExt;
202 202
@@ -275,7 +275,7 @@ pub mod path { · 72 unmodified lines
275 }275 }
276 }276 }
277 277
278 #[cfg(target_os = "windows")]278 #[cfg(any(target_os = "windows", target_os = "android"))]
279 fn interpolate_user(self) -> Result<Cow<'a, std::path::Path>, interpolate::Error> {279 fn interpolate_user(self) -> Result<Cow<'a, std::path::Path>, interpolate::Error> {
280 Err(interpolate::Error::UserInterpolationUnsupported)280 Err(interpolate::Error::UserInterpolationUnsupported)
281 }281 }