diff --git a/scripts/update-patches.sh b/scripts/update-patches.sh
index 62d5bf78b5fd8a1c649f6e90bcbc81d8c2233991..41ee55d56f57f6962e02f2969f26a53eb19155e9 100755
--- a/scripts/update-patches.sh
+++ b/scripts/update-patches.sh
@@ -16,6 +16,6 @@ for module in $GLUON_MODULES; do
 	n=0
 	for commit in $(git rev-list --reverse --no-merges base..patched); do
 		let n=n+1
-		git show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames "$commit" > "$GLUONDIR/patches/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch"
+		git -c core.abbrev=40 show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames "$commit" > "$GLUONDIR/patches/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch"
 	done
 done