diff options
-rwxr-xr-x | abuild.in | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |