Skip to content

Commit 10a20d6

Browse files
authored
Merge pull request #2124 from GitoxideLabs/improvements
improvements
2 parents f7f087c + 042efa0 commit 10a20d6

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
For now, please have a look at the section in the [README] file.
1+
### Please disclose the use AI…
2+
3+
…if it's *full agent mode* or *multi*-line completions in the PR comment.
4+
5+
For everything else, please have a look at the respective section in the [README] file.
26

37
[README]: https://github.com/GitoxideLabs/gitoxide#contributions

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ $(test_many_commits_1m_repo):
5353
mkdir -p $@
5454
cd $@ && git init --bare && git remote add origin https://github.com/cirosantilli/test-many-commits-1m.git && git fetch
5555

56+
etc/gix-asciicast.svg:
57+
svg-term --cast=542159 --out $@ --window
58+
5659
## get all non-rc tags up to v5.8, oldest tag first (should have 78 tags)
5760
## -> convert to commit ids
5861
## -> write a new incremental commit-graph file for each commit id

gix-config/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur
3535
smallvec = "1.15.1"
3636
once_cell = "1.21.3"
3737

38+
[target.'cfg(not(target_family = "wasm"))'.dependencies]
39+
home = "0.5.5"
40+
3841
document-features = { version = "0.2.0", optional = true }
3942

4043
[dev-dependencies]

gix-config/src/source.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,22 @@ impl Source {
100100
User => env_var("GIT_CONFIG_GLOBAL")
101101
.map(|global_override| PathBuf::from(global_override).into())
102102
.or_else(|| {
103-
env_var("HOME").map(|home| {
104-
let mut p = PathBuf::from(home);
105-
p.push(".gitconfig");
106-
p.into()
107-
})
103+
env_var("HOME")
104+
.map(PathBuf::from)
105+
.or_else(|| {
106+
#[cfg(not(target_family = "wasm"))]
107+
{
108+
home::home_dir()
109+
}
110+
#[cfg(target_family = "wasm")]
111+
{
112+
None
113+
}
114+
})
115+
.map(|mut p| {
116+
p.push(".gitconfig");
117+
p.into()
118+
})
108119
}),
109120
Local => Some(Path::new("config").into()),
110121
Worktree => Some(Path::new("config.worktree").into()),

0 commit comments

Comments
 (0)