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

Does not correctly reset git repo in some cases #41

Open
twpol opened this issue Jul 31, 2023 · 0 comments
Open

Does not correctly reset git repo in some cases #41

twpol opened this issue Jul 31, 2023 · 0 comments

Comments

@twpol
Copy link
Member

twpol commented Jul 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant