Skip to content

Commit 2189cee

Browse files
committed
fix!: rename GITOXIDE_* environment variables to GIX_#
1 parent 5fdc9df commit 2189cee

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

Diff for: build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
.and_then(|out| parse_describe(&out.stdout))
99
.unwrap_or_else(|| env!("CARGO_PKG_VERSION").into());
1010

11-
println!("cargo:rustc-env=GITOXIDE_VERSION={version}");
11+
println!("cargo:rustc-env=GIX_VERSION={version}");
1212
}
1313

1414
fn parse_describe(input: &[u8]) -> Option<String> {

Diff for: examples/log.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main() {
2020
}
2121

2222
#[derive(Debug, clap::Parser)]
23-
#[clap(name = "log", about = "git log example", version = option_env!("GITOXIDE_VERSION"))]
23+
#[clap(name = "log", about = "git log example", version = option_env!("GIX_VERSION"))]
2424
struct Args {
2525
/// Alternative git directory to use
2626
#[clap(name = "dir", long = "git-dir")]

Diff for: examples/ls-tree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
}
1313

1414
#[derive(Debug, clap::Parser)]
15-
#[clap(name = "ls-tree", about = "git ls-tree example", version = option_env!("GITOXIDE_VERSION"))]
15+
#[clap(name = "ls-tree", about = "git ls-tree example", version = option_env!("GIX_VERSION"))]
1616
#[clap(arg_required_else_help = true)]
1717
struct Args {
1818
/// Recurse into subtrees

Diff for: gix-discover/tests/upwards/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::path::PathBuf;
33
use gix_discover::repository::Kind;
44

55
fn expected_trust() -> gix_sec::Trust {
6-
if std::env::var_os("GITOXIDE_TEST_EXPECT_REDUCED_TRUST").is_some() {
6+
if std::env::var_os("GIX_TEST_EXPECT_REDUCED_TRUST").is_some() {
77
gix_sec::Trust::Reduced
88
} else {
99
gix_sec::Trust::Full

Diff for: gix/src/config/tree/sections/core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl Core {
1717
/// The `core.deltaBaseCacheLimit` key.
1818
pub const DELTA_BASE_CACHE_LIMIT: keys::UnsignedInteger =
1919
keys::UnsignedInteger::new_unsigned_integer("deltaBaseCacheLimit", &config::Tree::CORE)
20-
.with_environment_override("GITOXIDE_PACK_CACHE_MEMORY")
20+
.with_environment_override("GIX_PACK_CACHE_MEMORY")
2121
.with_note("if unset, we default to a small 64 slot fixed-size cache that holds at most 64 full delta base objects of any size. Set to 0 to deactivate it entirely");
2222
/// The `core.disambiguate` key.
2323
pub const DISAMBIGUATE: Disambiguate =

Diff for: gix/src/config/tree/sections/gitoxide.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ mod subsections {
410410
pub const CACHE_LIMIT: keys::UnsignedInteger =
411411
keys::UnsignedInteger::new_unsigned_integer("cacheLimit", &Gitoxide::OBJECTS)
412412
.with_note("If unset or 0, there is no object cache")
413-
.with_environment_override("GITOXIDE_OBJECT_CACHE_MEMORY");
413+
.with_environment_override("GIX_OBJECT_CACHE_MEMORY");
414414
/// The `gitoxide.objects.noReplace` key.
415415
pub const NO_REPLACE: keys::Boolean = keys::Boolean::new_boolean("noReplace", &Gitoxide::OBJECTS);
416416
/// The `gitoxide.objects.replaceRefBase` key.

Diff for: gix/tests/config/tree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ mod core {
448448
.try_into_usize(signed(-1))
449449
.unwrap_err()
450450
.to_string(),
451-
"The value of key \"core.deltaBaseCacheLimit\" (possibly from GITOXIDE_PACK_CACHE_MEMORY) could not be parsed as unsigned integer"
451+
"The value of key \"core.deltaBaseCacheLimit\" (possibly from GIX_PACK_CACHE_MEMORY) could not be parsed as unsigned integer"
452452
);
453453
assert!(Core::DELTA_BASE_CACHE_LIMIT.validate("-1".into()).is_err());
454454
Ok(())

Diff for: gix/tests/gix-init.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ mod with_overrides {
3838
.set("GIT_AUTHOR_EMAIL", "author email")
3939
.set("GIT_AUTHOR_DATE", default_date)
4040
.set("EMAIL", "user email")
41-
.set("GITOXIDE_PACK_CACHE_MEMORY", "0")
42-
.set("GITOXIDE_OBJECT_CACHE_MEMORY", "5m")
41+
.set("GIX_PACK_CACHE_MEMORY", "0")
42+
.set("GIX_OBJECT_CACHE_MEMORY", "5m")
4343
.set("GIT_SSL_CAINFO", "./env.pem")
4444
.set("GIT_SSL_VERSION", "tlsv1.3")
4545
.set("GIT_SSH_VARIANT", "ssh-variant-env")

Diff for: src/plumbing/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ pub fn main() -> Result<()> {
255255
let mut engine = core::corpus::Engine::open_or_create(
256256
db,
257257
core::corpus::engine::State {
258-
gitoxide_version: option_env!("GITOXIDE_VERSION")
259-
.ok_or_else(|| anyhow::anyhow!("GITOXIDE_VERSION must be set in build-script"))?
258+
gitoxide_version: option_env!("GIX_VERSION")
259+
.ok_or_else(|| anyhow::anyhow!("GIX_VERSION must be set in build-script"))?
260260
.into(),
261261
progress,
262262
trace_to_progress: trace,

Diff for: src/plumbing/options/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use gitoxide_core as core;
55
use gix::bstr::BString;
66

77
#[derive(Debug, clap::Parser)]
8-
#[clap(name = "gix", about = "The git underworld", version = option_env!("GITOXIDE_VERSION"))]
8+
#[clap(name = "gix", about = "The git underworld", version = option_env!("GIX_VERSION"))]
99
#[clap(subcommand_required = true)]
1010
#[clap(arg_required_else_help = true)]
1111
pub struct Args {

Diff for: src/porcelain/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::path::PathBuf;
22

33
#[derive(Debug, clap::Parser)]
4-
#[clap(about = "The rusty git", version = option_env!("GITOXIDE_VERSION"))]
4+
#[clap(about = "The rusty git", version = option_env!("GIX_VERSION"))]
55
#[clap(subcommand_required = true)]
66
pub struct Args {
77
/// Do not display verbose messages and progress information

Diff for: tests/tools/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ fn fixture_bytes_inner(path: impl AsRef<Path>, root: DirectoryRoot) -> Vec<u8> {
262262
/// In order to speed up CI and even local runs should the cache get purged, the result of each script run
263263
/// is automatically placed into a compressed _tar_ archive.
264264
/// If a script result doesn't exist, these will be checked first and extracted if present, which they are by default.
265-
/// This behaviour can be prohibited by setting the `GITOXIDE_TEST_IGNORE_ARCHIVES` to any value.
265+
/// This behaviour can be prohibited by setting the `GIX_TEST_IGNORE_ARCHIVES` to any value.
266266
///
267267
/// To speed CI up, one can add these archives to the repository. It's absolutely recommended to use `gix-lfs` for that to
268268
/// not bloat the repository size.
@@ -631,11 +631,11 @@ fn extract_archive(
631631
let archive_buf: Vec<u8> = {
632632
let mut buf = Vec::new();
633633
let input_archive = std::fs::File::open(archive)?;
634-
if std::env::var_os("GITOXIDE_TEST_IGNORE_ARCHIVES").is_some() {
634+
if std::env::var_os("GIX_TEST_IGNORE_ARCHIVES").is_some() {
635635
return Err(std::io::Error::new(
636636
std::io::ErrorKind::Other,
637637
format!(
638-
"Ignoring archive at '{}' as GITOXIDE_TEST_IGNORE_ARCHIVES is set.",
638+
"Ignoring archive at '{}' as GIX_TEST_IGNORE_ARCHIVES is set.",
639639
archive.display()
640640
),
641641
));

0 commit comments

Comments
 (0)