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

running dune in a git repository without any commit fails with a git error #3979

Closed
hannesm opened this issue Nov 27, 2020 · 1 comment
Closed

Comments

@hannesm
Copy link
Member

hannesm commented Nov 27, 2020

Expected Behavior

successful build of a binary

Actual Behavior

# dune build no.exe
         git (internal) (exit 128)
/usr/local/bin/git rev-parse HEAD > /tmp/dune1dde43.output
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Reproduction

# mkdir /tmp/foo
# cd /tmp/foo
# touch no.ml
# echo "(executable (name no))" > dune
# dune build no.exe
--> success (as expected)
# dune clean
# git init
# dune build no.exe
         git (internal) (exit 128)
/usr/local/bin/git rev-parse HEAD > /tmp/dune1dde43.output
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
--> here I expected it to "just work"

Specifications

  • Version of dune (output of dune --version):
    2.7.1
  • Version of ocaml (output of ocamlc --version)
  • Operating system (distribution and version):
@rgrinberg
Copy link
Member

#4441 fixes this.

@rgrinberg rgrinberg added this to the 3.0 milestone Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants