Display correct `HEAD detached` text in `git status`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start from the status subcommand's branch-name output, where it prints On branch HEAD for a detached HEAD. Check whether libgit2 reports the detached state at that point, then print HEAD detached at <short sha> in red, matching the git status output quoted in the issue. Done when git2cpp status after git checkout HEAD~1 shows that line and the clean-tree message is unchanged.
Written by the indexing model from the issue text.
Description
If we have a detached HEAD situation, such as after a git checkout HEAD~1, the git2cpp status result is:
$ git2cpp status
On branch HEAD
Nothing to commit, working tree clean
Using git the output is more explicit:
$ git status
HEAD detached at 79e894b
Nothing to commit, working tree clean
and the HEAD detached at is red.
- Dominant language
- C++
- Stars
- 7
- Forks
- 5
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QuantStack/git2cpp
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
QuantStack/git2cpp#203 ·
Maintainers usually reply within 1 day
-
Checkout message duplicatedPossibly taken @ianthomas23 claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 25/100
QuantStack/git2cpp#202 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
QuantStack/git2cpp#193 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 42/100
QuantStack/git2cpp#131 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
QuantStack/git2cpp#62 ·
Maintainers usually reply within 1 day
All issues in QuantStack/git2cpp
Similar issues
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaptisteHudyma/Lamp-Da#588 ·
Maintainers usually reply within 1 day
-
bug macOS networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docling-project/docling-parse#448 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
TokisanGames/Terrain3D#1073 ·
Maintainers usually reply within 1 day