File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
test/blackbox-tests/test-cases/pkg/pin-stanza Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -73,3 +73,37 @@ In this case Dune can't determine which reference to use and will error out:
7373 Error: Reference " duplicated" in remote
7474 " file://$ PWD /_repo"
7575 is ambiguous
76+
77+ Git also has unambibuous namespaces tags and branches, for tags it is `refs/ tags/ `.
78+
79+ $ cat > dune-project << EOF
80+ > (lang dune 3.13 )
81+ > (pin
82+ > (url " git+file://$ PWD /_repo#refs/tags/duplicated" )
83+ > (package (name foo)))
84+ > (package
85+ > (name main)
86+ > (depends foo))
87+ > EOF
88+
89+ Locking should work, as there are no ambiguous references.
90+
91+ $ dune pkg lock 2 > &1 | tr ' \n' ' ' | sed ' s#/.*/git #git #'
92+ Error: Command returned nothing : cd git rev-parse -- verify -- quiet refs/ tags/ duplicated^ {commit}
93+
94+ For branches the namespace is `refs/ heads/ `:
95+
96+ $ cat > dune-project << EOF
97+ > (lang dune 3.13 )
98+ > (pin
99+ > (url " git+file://$ PWD /_repo#refs/heads/duplicated" )
100+ > (package (name foo)))
101+ > (package
102+ > (name main)
103+ > (depends foo))
104+ > EOF
105+
106+ Likewise locking a branch this way should work as well:
107+
108+ $ dune pkg lock 2 > &1 | tr ' \n' ' ' | sed ' s#/.*/git #git #'
109+ Error: Command returned nothing : cd git rev-parse -- verify -- quiet refs/ heads/ duplicated^ {commit}
You can’t perform that action at this time.
0 commit comments