Skip to content

Commit a187bf7

Browse files
kit-ty-katerjbou
authored andcommitted
Merge pull request ocaml#5342 from reynir/revision-full-hash
git, hg: Use full revision
1 parent 05d6c8e commit a187bf7

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/repository/opamGit.ml

+1-4
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ module VCS : OpamVCS.VCS = struct
157157
match r.OpamProcess.r_stdout with
158158
| [] -> Done None
159159
| full::_ ->
160-
if String.length full > 8 then
161-
Done (Some (String.sub full 0 8))
162-
else
163-
Done (Some full))
160+
Done (Some full))
164161

165162
let clean repo_root =
166163
git repo_root [ "clean"; "-fdx" ]

src/repository/opamHg.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ module VCS = struct
5353
match r.OpamProcess.r_stdout with
5454
| [] -> Done None
5555
| full::_ ->
56-
if String.length full > 8 then Done (Some (String.sub full 0 8))
57-
else Done (Some full)
56+
Done (Some full)
5857

5958
let clean repo_root =
6059
hg repo_root ["revert"; "--all"; "--no-backup"]

0 commit comments

Comments
 (0)