chore(git-utils): satisfy final lint gates

This commit is contained in:
Chris Bookholt
2026-07-02 08:29:47 -07:00
parent 80d6f7f52b
commit 932d5c3d38
2 changed files with 9 additions and 10 deletions
+7 -9
View File
@@ -691,7 +691,7 @@ impl<'git> GuardedGitConfig<'git> {
let mut command = self.sources.git.async_command_for_cwd(&requested_cwd)?;
command
.env("GIT_OPTIONAL_LOCKS", "0")
.args(self.status_config_args(FsmonitorOverride::Disabled, None)?)
.args(self.status_config_args(FsmonitorOverride::Disabled, /*neutralizer*/ None)?)
.args(["rev-parse", "--show-toplevel"]);
let output = self
.sources
@@ -728,7 +728,8 @@ impl<'git> GuardedGitConfig<'git> {
"tracked paths must be read before status policy installation",
));
}
let mut command = self.pending_status_command(FsmonitorOverride::Disabled, None)?;
let mut command =
self.pending_status_command(FsmonitorOverride::Disabled, /*neutralizer*/ None)?;
command
.disable_optional_locks()
.args(["ls-files", "-z", "--cached"]);
@@ -1284,13 +1285,10 @@ impl FsmonitorProbeRunner for StatusFsmonitorProbeRunner<'_, '_> {
}
fn command_failure(description: &str, output: &std::process::Output) -> io::Error {
io::Error::new(
io::ErrorKind::Other,
StatusPolicyCommandFailure {
description: description.to_string(),
exit_code: output.status.code(),
},
)
io::Error::other(StatusPolicyCommandFailure {
description: description.to_string(),
exit_code: output.status.code(),
})
}
fn git_path_from_line_output(output: &[u8]) -> io::Result<PathBuf> {
+2 -1
View File
@@ -24,7 +24,8 @@ pub(crate) async fn prepare_status_config<'git>(
.map_err(|error| {
if error
.get_ref()
.is_some_and(|source| source.is::<NoActiveStatusWorktree>())
.and_then(|source| source.downcast_ref::<NoActiveStatusWorktree>())
.is_some()
{
GitReadError::NotRepository {
path: requested_cwd.to_path_buf(),