diff --git a/git-repository/src/create.rs b/git-repository/src/create.rs index 14050eb79e8..06eaaafd998 100644 --- a/git-repository/src/create.rs +++ b/git-repository/src/create.rs @@ -110,6 +110,9 @@ pub struct Options { /// Create a new `.git` repository of `kind` within the possibly non-existing `directory` /// and return its path. +/// Note that this is a simple template-based initialization routine which should be accompanied with additional corrections +/// to respect git configuration, which is accomplished by [its callers][crate::ThreadSafeRepository::init_opts()] +/// that return a [Repository][crate::Repository]. pub fn into( directory: impl Into, Options { bare, fs_capabilities }: Options, diff --git a/git-repository/tests/clone/mod.rs b/git-repository/tests/clone/mod.rs index 4e34c7b6e28..b07e0319457 100644 --- a/git-repository/tests/clone/mod.rs +++ b/git-repository/tests/clone/mod.rs @@ -1,5 +1,4 @@ use git_repository as git; -use std::sync::atomic::AtomicBool; use crate::remote; @@ -60,7 +59,7 @@ fn fetch_and_checkout() -> crate::Result { let mut prepare = git::prepare_clone_bare(remote::repo("base").path(), tmp.path())?; let (mut checkout, _out) = prepare.fetch_then_checkout(git::progress::Discard, &std::sync::atomic::AtomicBool::default())?; - checkout.main_worktree(git::progress::Discard, &AtomicBool::default())?; + checkout.main_worktree(git::progress::Discard, &std::sync::atomic::AtomicBool::default())?; Ok(()) } diff --git a/src/plumbing/progress.rs b/src/plumbing/progress.rs index d41437006b9..71924bb94e0 100644 --- a/src/plumbing/progress.rs +++ b/src/plumbing/progress.rs @@ -335,6 +335,12 @@ static GIT_CONFIG: &[Record] = &[ note: Some("Implements our own 'naive' algorithm, only"), }, }, + Record { + config: "init.defaultBranch", + usage: Planned { + note: Some("Needed when initializing any git repository"), + }, + }, Record { config: "pack.threads", usage: InModule {