Skip to content

Does not correctly reset git repo in some cases #41

Open
@twpol

Description

@twpol

When the git directory is empty (as seems to happen from time to time) the code tries to reset and fails:

  > git --no-pager clean --force -d -x
  < Refusing to remove current working directory
  ! fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
  ! Use '--' to separate paths from revisions, like this:
  ! 'git <command> [<revision>...] -- [<file>...]'
  ! fatal: ambiguous argument 'unstable': unknown revision or path not in the working tree.
  ! Use '--' to separate paths from revisions, like this:
  ! 'git <command> [<revision>...] -- [<file>...]'
  ! fatal: ambiguous argument 'unstable^{tree}': unknown revision or path not in the working tree.
  ! Use '--' to separate paths from revisions, like this:
  ! 'git <command> [<revision>...] -- [<file>...]'

It should be possible to validate the git directory (and simply delete it if it fails) at the start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions