summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-10-08 19:05:45 +0200
committerJörg Thalheim <joerg@higgsboson.tk>2016-12-05 12:32:14 +0100
commit47d0d3d46f5520fba39c5376ea5449d51f44635d (patch)
tree6733514d9e5df51b0de6fa903d68782092d1bb74 /pkgs/build-support/fetchgit
parent954d9953941d6c94abb5d2d549bd18486d0b27ab (diff)
downloadnixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar.gz
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar.bz2
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar.lz
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar.xz
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.tar.zst
nixpkgs-47d0d3d46f5520fba39c5376ea5449d51f44635d.zip
nix-prefetch-git: fix date field
in some cases `git show` include tag information in the output
this is suppressed by the parameter '-1'
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 54945d203af..f71d9ac55bc 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -291,8 +291,8 @@ _clone_user_rev() {
     pushd "$dir" >/dev/null
     fullRev=$( (git rev-parse "$rev" 2>/dev/null || git rev-parse "refs/heads/$branchName") | tail -n1)
     humanReadableRev=$(git describe "$fullRev" 2> /dev/null || git describe --tags "$fullRev" 2> /dev/null || echo -- none --)
-    commitDate=$(git show --no-patch --pretty=%ci "$fullRev")
-    commitDateStrict8601=$(git show --no-patch --pretty=%cI "$fullRev")
+    commitDate=$(git show -1 --no-patch --pretty=%ci "$fullRev")
+    commitDateStrict8601=$(git show -1 --no-patch --pretty=%cI "$fullRev")
     popd >/dev/null
 
     # Allow doing additional processing before .git removal