rust-lang / rust-lang/git2-rs

`RepositoryInitOptions::description` is ignored

Open
#848 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.1k
Forks
450
Avg merge
11m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in src/main.rs and trace Repository::init_opts with RepositoryInitOptions::description. Run the example and inspect test/.git/description; done means the supplied description is written instead of the default text.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.