11// TODO: tests
2- use crate :: FilesystemCapabilities ;
2+ use crate :: Capabilities ;
33use std:: path:: Path ;
44
55#[ cfg( windows) ]
6- impl Default for FilesystemCapabilities {
6+ impl Default for Capabilities {
77 fn default ( ) -> Self {
8- FilesystemCapabilities {
8+ Capabilities {
99 precompose_unicode : false ,
1010 ignore_case : true ,
1111 executable_bit : false ,
@@ -15,9 +15,9 @@ impl Default for FilesystemCapabilities {
1515}
1616
1717#[ cfg( target_os = "macos" ) ]
18- impl Default for FilesystemCapabilities {
18+ impl Default for Capabilities {
1919 fn default ( ) -> Self {
20- FilesystemCapabilities {
20+ Capabilities {
2121 precompose_unicode : true ,
2222 ignore_case : true ,
2323 executable_bit : true ,
@@ -27,9 +27,9 @@ impl Default for FilesystemCapabilities {
2727}
2828
2929#[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
30- impl Default for FilesystemCapabilities {
30+ impl Default for Capabilities {
3131 fn default ( ) -> Self {
32- FilesystemCapabilities {
32+ Capabilities {
3333 precompose_unicode : false ,
3434 ignore_case : false ,
3535 executable_bit : true ,
@@ -38,16 +38,16 @@ impl Default for FilesystemCapabilities {
3838 }
3939}
4040
41- impl FilesystemCapabilities {
41+ impl Capabilities {
4242 /// try to determine all values in this context by probing them in the given `git_dir`, which
4343 /// should be on the file system the git repository is located on.
4444 /// `git_dir` is a typical git repository, expected to be populated with the typical files like `config`.
4545 ///
4646 /// All errors are ignored and interpreted on top of the default for the platform the binary is compiled for.
4747 pub fn probe ( git_dir : impl AsRef < Path > ) -> Self {
4848 let root = git_dir. as_ref ( ) ;
49- let ctx = FilesystemCapabilities :: default ( ) ;
50- FilesystemCapabilities {
49+ let ctx = Capabilities :: default ( ) ;
50+ Capabilities {
5151 symlink : Self :: probe_symlink ( root) . unwrap_or ( ctx. symlink ) ,
5252 ignore_case : Self :: probe_ignore_case ( root) . unwrap_or ( ctx. ignore_case ) ,
5353 precompose_unicode : Self :: probe_precompose_unicode ( root) . unwrap_or ( ctx. precompose_unicode ) ,
0 commit comments