Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report | git status subcommand displays an error when running on a new Git branch or repository #2

Open
JosephLai241 opened this issue Aug 24, 2022 · 0 comments
Assignees
Labels
beta This issue or feature should be resolved or implemented before an official release bug Something isn't working

Comments

@JosephLai241
Copy link
Owner

Describe The Bug

The nd git status subcommand should usually display some branch information on top of the tree containing changed files. Running this command on a new branch or a new repository will display an error instead of the branch information.

Expected Behavior

This subcommand should successfully display branch information and upstream branch information, if applicable.

Actual Behavior

An error message appears in lieu of the branch information.

Steps To Reproduce

  • git checkout a new branch or create a new Git repository locally.
  • Run nd git status.
    • An error should be displayed on top of the tree containing changed files.

Traceback/Output

Could not get repository HEAD!

# The Git status tree is displayed here.
# ...
# ...
# ...

Additional Context

I need to revisit the git2 crate and figure out a different way, or perhaps how to handle different conditions, to go about extracting branch and upstream branch information from a Git repository.

@JosephLai241 JosephLai241 added bug Something isn't working beta This issue or feature should be resolved or implemented before an official release labels Aug 24, 2022
@JosephLai241 JosephLai241 self-assigned this Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta This issue or feature should be resolved or implemented before an official release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant