make hashlength configurable in make-tarball.sh
[skip changelog]
This commit is contained in:
parent
afdeae3484
commit
645f17ba67
@ -3,15 +3,16 @@
|
|||||||
# args
|
# args
|
||||||
repo="${1%/}"
|
repo="${1%/}"
|
||||||
ref="${2-HEAD}"
|
ref="${2-HEAD}"
|
||||||
|
ab="${3-12}"
|
||||||
|
|
||||||
# check
|
# check
|
||||||
if test ! -d "${repo}/.git"; then
|
if test ! -d "${repo}/.git"; then
|
||||||
echo "usage: $0 <repodir> [ <ref> ]"
|
echo "usage: $0 <repodir> [ <ref> [ <abbrev> ] ]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get + print info
|
# 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 '-')
|
date=$(cd $repo; git show --pretty='format:%cs' $ref | head -1 | tr -d '-')
|
||||||
echo "# $repo $ref -> commit $commit - date $date"
|
echo "# $repo $ref -> commit $commit - date $date"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user