Skip to content

panic when git repo has no commit #20

@DavidSatimeWallin

Description

@DavidSatimeWallin

thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { code: -9, klass: 4, message: "reference 'refs/heads/master' not found" }', src/libcore/result.rs:906:4
note: Run with RUST_BACKTRACE=1 for a backtrace.

I get this when i create a folder and 'git init' in it without adding or committing the files inside the dir. After i did the git add . and git commit -am "initial commit" it works fine again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions