summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/abuild.in b/abuild.in
index ea0ad02..e6969fa 100755
--- a/abuild.in
+++ b/abuild.in
@@ -808,10 +808,11 @@ EOF
done
fi
- local last_commit="$(git_last_commit)$(git_dirty)"
- if [ -n "$last_commit" ]; then
- echo "commit = $last_commit" >> "$pkginfo"
+ # store last_commit in global var so we only call git once
+ if [ -z "$last_commit" ]; then
+ last_commit="$(git_last_commit)$(git_dirty)"
fi
+ echo "commit = $last_commit" >> "$pkginfo"
get_maintainer
if [ -n "$maintainer" ]; then