Skip to content

Commit

Permalink
Merge pull request #5342 from reynir/revision-full-hash
Browse files Browse the repository at this point in the history
git, hg: Use full revision
  • Loading branch information
kit-ty-kate authored Jan 4, 2023
2 parents 56a3a15 + 0d94c43 commit 601e244
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ users)
* Use 4.08's unnamed functor arguments to silence warning 67 [#4775 @dra27]
* git: disable colored output [#4884 @rjbou]
* Check if a source is up to date with subpath [#4876 @rjbou]
* git, hg: Use the full SHA1 revision instead of just the 8 first characters [#5342 @reynir]

## Build
* Bump src_exts and fix build compat with Dune 2.9.0 [#4752 @dra27]
Expand Down
5 changes: 1 addition & 4 deletions src/repository/opamGit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ module VCS : OpamVCS.VCS = struct
match r.OpamProcess.r_stdout with
| [] -> Done None
| full::_ ->
if String.length full > 8 then
Done (Some (String.sub full 0 8))
else
Done (Some full))
Done (Some full))

let clean repo_root =
git repo_root [ "clean"; "-fdx" ]
Expand Down
3 changes: 1 addition & 2 deletions src/repository/opamHg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ module VCS = struct
match r.OpamProcess.r_stdout with
| [] -> Done None
| full::_ ->
if String.length full > 8 then Done (Some (String.sub full 0 8))
else Done (Some full)
Done (Some full)

let clean repo_root =
hg repo_root ["revert"; "--all"; "--no-backup"]
Expand Down

0 comments on commit 601e244

Please sign in to comment.