From 1242151079004ae99fae7b80966de151961a6159 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 22 May 2024 07:22:01 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Eliah Kagan --- gix-fs/tests/stack/mod.rs | 4 ++-- gix-ref/src/store/file/mod.rs | 2 +- gix-validate/tests/path/mod.rs | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gix-fs/tests/stack/mod.rs b/gix-fs/tests/stack/mod.rs index 7e50d40898e..c79db87dbf9 100644 --- a/gix-fs/tests/stack/mod.rs +++ b/gix-fs/tests/stack/mod.rs @@ -59,7 +59,7 @@ fn path_join_handling() { assert_eq!( p("c:").join("relative"), p("c:relative"), - "absolute + relative = strange joined result with missing backslash, but it's a valid path that works just like `c:\relative`" + "drive + relative = strange joined result with missing backslash, but it's a valid path that works just like `c:\relative`" ); assert_eq!( p("c:\\").join("relative"), @@ -102,7 +102,7 @@ fn path_join_handling() { assert_eq!( p("c:\\").join("\\\\.\\"), p("\\\\.\\"), - "d-drive-with-bs + device-namespace-unc = device-namespace-unc" + "c-drive-with-bs + device-namespace-unc = device-namespace-unc" ); assert_eq!( p("/").join("C:/"), diff --git a/gix-ref/src/store/file/mod.rs b/gix-ref/src/store/file/mod.rs index ec7c7fc624c..c01c9deb4d8 100644 --- a/gix-ref/src/store/file/mod.rs +++ b/gix-ref/src/store/file/mod.rs @@ -27,7 +27,7 @@ pub struct Store { pub write_reflog: WriteReflog, /// The namespace to use for edits and reads pub namespace: Option, - /// This is only useful on Windows, which may have 'virtual' devices on each level of a path so that + /// This is only needed on Windows, where some device names are reserved at any level of a path, so that /// reading or writing `refs/heads/CON` for example would read from the console, or write to it. pub prohibit_windows_device_names: bool, /// If set, we will convert decomposed unicode like `a\u308` into precomposed unicode like `รค` when reading diff --git a/gix-validate/tests/path/mod.rs b/gix-validate/tests/path/mod.rs index 0257270ad23..e9aa7a6ec88 100644 --- a/gix-validate/tests/path/mod.rs +++ b/gix-validate/tests/path/mod.rs @@ -66,7 +66,7 @@ mod component { mktest!(dot_gitmodules_as_file, b".gitmodules", UNIX_OPTS); mktest!( starts_with_dot_git_with_backslashes_on_linux, - b".git\\hooks\\precommit", + b".git\\hooks\\pre-commit", UNIX_OPTS ); mktest!(not_dot_git_shorter, b".gi", NO_OPTS); @@ -136,7 +136,7 @@ mod component { mktest!(dot_git_upper, b".GIT", Error::DotGitDir, NO_OPTS); mktest!( starts_with_dot_git_with_backslashes_on_windows, - b".git\\hooks\\precommit", + b".git\\hooks\\pre-commit", Error::PathSeparator ); mktest!(dot_git_upper_hfs, ".GIT\u{200e}".as_bytes(), Error::DotGitDir); @@ -199,12 +199,12 @@ mod component { Error::WindowsIllegalCharacter ); mktest!( - ntfs_stream_default_explicit, - b"file:$ANYTHING_REALLY:$DATA", + ntfs_stream_explicit, + b"file:ANYTHING_REALLY:$DATA", Error::WindowsIllegalCharacter ); mktest!( - dot_gitmodules_lower_ntfs_stream_default_explicit, + dot_gitmodules_lower_ntfs_stream, b".gitmodules:$DATA:$DATA", Error::SymlinkedGitModules, Symlink,