From 645f17ba67eb0be81c19afd1f42e37dd5c3a8689 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 28 Nov 2023 15:09:31 +0100 Subject: [PATCH] make hashlength configurable in make-tarball.sh [skip changelog] --- make-tarball.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make-tarball.sh b/make-tarball.sh index b0c0b8b..7020310 100755 --- a/make-tarball.sh +++ b/make-tarball.sh @@ -3,15 +3,16 @@ # args repo="${1%/}" ref="${2-HEAD}" +ab="${3-12}" # check if test ! -d "${repo}/.git"; then - echo "usage: $0 [ ]" + echo "usage: $0 [ [ ] ]" exit 1 fi # get + print info -commit=$(cd $repo; git show --pretty='format:%h' $ref | head -1) +commit=$(cd $repo; git show --abbrev=$ab --pretty='format:%h' $ref | head -1) date=$(cd $repo; git show --pretty='format:%cs' $ref | head -1 | tr -d '-') echo "# $repo $ref -> commit $commit - date $date"