git2-rs
git2-rs copied to clipboard
`RepositoryInitOptions::description` is ignored
RepositoryInitOptions::description seems to be ignored:
// src/main.rs
fn main() -> Result<(), Box<dyn std::error::Error>> {
let _ = git2::Repository::init_opts(
"test",
git2::RepositoryInitOptions::new().description("test"),
)?;
Ok(())
}
$ cargo run
$ cat test/.git/description
Unnamed repository; edit this file 'description' to name the repository.
Do you perhaps have init.templateDir configured in your global config? It defaults to using that (overriding the init options).
It seems that init.templateDir is not set in my environment.
$ git config init.templateDir
# no output