Skip to content

Commit

Permalink
Mark the upcoming usage of init.defaultBranch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Oct 12, 2022
1 parent d91bbcc commit 6225f35
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions git-repository/src/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,
Options { bare, fs_capabilities }: Options,
Expand Down
3 changes: 1 addition & 2 deletions git-repository/tests/clone/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use git_repository as git;
use std::sync::atomic::AtomicBool;

use crate::remote;

Expand Down Expand Up @@ -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(())
}

Expand Down
6 changes: 6 additions & 0 deletions src/plumbing/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6225f35

Please sign in to comment.