We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aaae54 commit e8ad49fCopy full SHA for e8ad49f
test/blackbox-tests/test-cases/github4429.t/run.t
@@ -0,0 +1,24 @@
1
+Test the behaviour of Dune querying git when the repo has no commit.
2
+
3
+Create a repository with no HEAD commit:
4
5
+ $ git init --quiet
6
7
+... and an executable that links `dune-build-info':
8
9
+ $ echo "(lang dune 2.0)" > dune-project
10
+ $ touch main.ml
11
+ $ cat >dune <<EOF
12
+ > (executable
13
+ > (name main)
14
+ > (libraries dune-build-info)
15
+ > (promote (until-clean)))
16
+ > EOF
17
18
+At the moment Dune fails, which is bad:
19
20
+ $ dune exec ./main.exe 2>&1 | sed 's/.*\/git/{{ git }}/; s/> .*.output/> {{ output_file }}/g'
21
+ git (internal) (exit 128)
22
+ {{ git }} describe --always --dirty > {{ output_file }}
23
+ fatal: bad revision 'HEAD'
24
0 commit comments