node: Rename `GIT_RESET` env var

This commit is contained in:
Alexis Sellier 2023-01-30 18:23:24 +01:00
parent 050b3acb2e
commit 98f7fe1db8
No known key found for this signature in database
4 changed files with 7 additions and 7 deletions

View File

@ -239,7 +239,7 @@ pub mod daemon {
let child = Command::new("git")
.env_clear()
.envs(env::vars().filter(|(k, _)| k == "PATH" || k.starts_with("GIT")))
.envs(radicle::git::env::GIT_RESET)
.envs(radicle::git::env::GIT_DEFAULT_CONFIG)
.env("GIT_PROTOCOL", "version=2")
.current_dir(storage)
.arg("daemon")

View File

@ -101,15 +101,15 @@ pub type QueryState = dyn Fn(&dyn ServiceState) -> Result<(), CommandError> + Se
/// Commands sent to the service by the operator.
pub enum Command {
/// Announce repository references for given project id to peers.
/// Announce repository references for given repository to peers.
AnnounceRefs(Id),
/// Connect to node with the given address.
Connect(NodeId, Address),
/// Fetch the given project from the network.
/// Fetch the given repository from the network.
Fetch(Id, chan::Sender<FetchLookup>),
/// Track the given project.
/// Track the given repository.
TrackRepo(Id, chan::Sender<bool>),
/// Untrack the given project.
/// Untrack the given repository.
UntrackRepo(Id, chan::Sender<bool>),
/// Track the given node.
TrackNode(NodeId, Option<String>, chan::Sender<bool>),

View File

@ -154,7 +154,7 @@ impl<G: Signer + EcSign + 'static> Worker<G> {
cmd.current_dir(repo.path())
.env_clear()
.envs(env::vars().filter(|(k, _)| k == "PATH" || k.starts_with("GIT_TRACE")))
.envs(git::env::GIT_RESET)
.envs(git::env::GIT_DEFAULT_CONFIG)
.args(["-c", "protocol.version=2"])
.arg("fetch")
.arg("--verbose");

View File

@ -510,7 +510,7 @@ pub mod url {
/// Git environment variables.
pub mod env {
/// Set of environment vars to reset git's configuration to default.
pub const GIT_RESET: [(&str, &str); 3] = [
pub const GIT_DEFAULT_CONFIG: [(&str, &str); 3] = [
("GIT_CONFIG", "/dev/null"),
("GIT_CONFIG_GLOBAL", "/dev/null"),
("GIT_CONFIG_NOSYSTEM", "1"),