From c3cf5fc22a1a0cb1e46869d4dfbeed0fa1e27f53 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 15 Mar 2022 11:26:29 +0530 Subject: forge: Fix showing only first commit on shallow cloned repos. HEAD~1..HEAD fails on shallow cloned repos. * guix/forge/build/git.scm (download-git-to-store): Use `--max-count 1' instead of HEAD~1..HEAD to show only the first commit. --- guix/forge/build/git.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/forge/build/git.scm b/guix/forge/build/git.scm index 098be83..bb8773a 100644 --- a/guix/forge/build/git.scm +++ b/guix/forge/build/git.scm @@ -74,7 +74,7 @@ shallow cloned and the .git directory is not included." (list ".")))) (when show-commit? (hline) - (invoke "git" "log" "HEAD~1..HEAD") + (invoke "git" "log" "--max-count" "1") (hline)) (unless deep-clone? (delete-file-recursively ".git"))) -- cgit v1.2.3