From 84e8a9294a78bc8ef1dac338cebe805ef7384c0f Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sat, 14 Feb 2015 04:53:05 -0800 Subject: [PATCH] Add a function to spit out latest git hash --- iKarith-super/fetch-rules.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iKarith-super/fetch-rules.sh b/iKarith-super/fetch-rules.sh index 2358a5e9..45b0644d 100644 --- a/iKarith-super/fetch-rules.sh +++ b/iKarith-super/fetch-rules.sh @@ -26,3 +26,9 @@ fetch_git() { fi } +# revision_git +# Output the hash of the last commit in a git repository +revision_git() { + git -C "$WORKDIR/$1" log -n 1 --pretty=format:%H +} +