Skip to content

Commit

Permalink
Avoid updating zfs_gitrev.h when rev is unchanged
Browse files Browse the repository at this point in the history
Build process would always re-compile spa_history.c due to touching
zfs_gitrev.h - avoid if no change in gitrev.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Chris Dunlop <[email protected]>
Reviewed-by: Allan Jude <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Closes openzfs#8860
  • Loading branch information
lundman authored and behlendorf committed Jun 7, 2019
1 parent fd7a657 commit 876d76b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/make_gitrev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ trap cleanup EXIT
git rev-parse --git-dir > /dev/null 2>&1
# Get the git current git revision
ZFS_GIT_REV=$(git describe --always --long --dirty 2>/dev/null)
# Check if header file already contain the exact string
grep -sq "\"${ZFS_GIT_REV}\"" "$(dirname "$0")"/../include/zfs_gitrev.h &&
trap - EXIT
exit 0

0 comments on commit 876d76b

Please sign in to comment.