From 3c010278a0c3438007d6c6950a1bf4dfeea8c010 Mon Sep 17 00:00:00 2001 From: Kate Date: Wed, 4 Jan 2023 17:55:03 +0000 Subject: [PATCH] Merge pull request #5342 from reynir/revision-full-hash git, hg: Use full revision --- master_changes.md | 5 +++++ src/repository/opamGit.ml | 5 +---- src/repository/opamHg.ml | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/master_changes.md b/master_changes.md index cc2ddbdc8df..481e827b24a 100644 --- a/master_changes.md +++ b/master_changes.md @@ -57,6 +57,11 @@ New option/command/subcommand are prefixed with ◈. ## VCS * + * Pass --depth=1 to git-fetch in the Git repo backend [#4442 @dra27] + * 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 diff --git a/src/repository/opamGit.ml b/src/repository/opamGit.ml index 9af216c9f71..563c3a7660c 100644 --- a/src/repository/opamGit.ml +++ b/src/repository/opamGit.ml @@ -157,10 +157,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" ] diff --git a/src/repository/opamHg.ml b/src/repository/opamHg.ml index bb40719b64d..0ee41ff4398 100644 --- a/src/repository/opamHg.ml +++ b/src/repository/opamHg.ml @@ -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"]