examples/commit: use --abbrev for commit summary
After v1.7.1.1~17^2~3 (pretty: Respect --abbrev option, 2010-05-03), plumbing users do not abbreviate %h hashes by default any more. Noticed while investigating the bug fixed by v1.7.1.1~17^2 (commit::print_summary(): don't use format_commit_message(), 2010-06-12). Cc: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Jul 27, 2010 at 13:44 UTC
7f1592db5d4cba2b3de3a1ce46eb8c05bd33e0a1
1 file changed
+1
-1
contrib/examples/git-commit.sh
+1
-1
@@ -631,7 +631,7 @@ then
631
if test -z "$quiet"
632
then
633
commit=`git diff-tree --always --shortstat --pretty="format:%h: %s"\
634
- --summary --root HEAD --`
634
+ --abbrev --summary --root HEAD --`
635
echo "Created${initial_commit:+ initial} commit $commit"
636
fi
637
fi