From: Christian Marangi Date: Fri, 10 Nov 2023 12:15:33 +0000 (+0100) Subject: update_git_source_package: use 12 char long hash for bump commits X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=79877bd7858df652d9745eeb4d2ed5e1c9e92a5f;p=maintainer-tools.git update_git_source_package: use 12 char long hash for bump commits The default value for abbrev commit is too small and might pose invalid hash referencing one hash with another. Use the current common size of 12 char for abbrev hash to better reference them following how it's done on linux kernel and github.com. Signed-off-by: Christian Marangi --- diff --git a/update_git_source_package.sh b/update_git_source_package.sh index a2f57f1..1d7f8ab 100755 --- a/update_git_source_package.sh +++ b/update_git_source_package.sh @@ -118,6 +118,7 @@ git clone --bare "$PKG_SOURCE_URL" "$TEMP_GIT_DIR" || { GIT_LOG="$(git -C "$TEMP_GIT_DIR" log \ --reverse --no-merges \ + --abbrev=12 \ --format="%h %s" \ "$PKG_SOURCE_VERSION..$COMMIT" \ )" || {