Skip to content

[BUG] reflog shows an option to view history of a commit when HEAD is detached #65

Description

@OldStarchy

1. Description

When in detached head mode the reflog shows an option to list the reflog for the commit

Image

This is an invalid option and shows an error when selected

Git Graph+: failed to get reflog: git reflog show (HEAD detached from 7e212fc) --format=%H�%h�%gd�%gs --date=iso -n 201 failed (exit 128): fatal: ambiguous argument '(HEAD detached from 7e212fc)': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

2. Steps to Reproduce

  1. checkout a commit in detached mode
  2. make a commit
  3. Open Git Graph+
  4. switch to "reflog" tab
  5. select the "(HEAD detached from )" option in the dropdown to the right of the search bar

3. Expected Behavior

The option is not available since individual commits don't have reflogs

4. Actual Behavior

an error is displayed

6. Environment

  • OS: Windows 11
  • VS Code version:
  • Git Graph+ version: 0.7.3
  • Git version: 2.50.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions