[maintainer-tools] update_git_source_package: use 12 char long hash for bump commits

LEDE Commits lede-commits at lists.infradead.org
Fri Nov 10 04:20:06 PST 2023


ansuel pushed a commit to maintainer-tools.git, branch master:
https://git.openwrt.org/79877bd7858df652d9745eeb4d2ed5e1c9e92a5f

commit 79877bd7858df652d9745eeb4d2ed5e1c9e92a5f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Nov 10 13:15:33 2023 +0100

    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 <ansuelsmth at gmail.com>
---
 update_git_source_package.sh | 1 +
 1 file changed, 1 insertion(+)

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" \
 )" || {




More information about the lede-commits mailing list