Stefan Tauner has uploaded this change for review.

View Change

fixup! Convert flashrom to git

Rename getrevision's local_revision function to just revision.
All revisions are local in git and we certainly wont go back to
a non-distributed VCS :)

Change-Id: I6689ac24077b3981b471ed69de7cc3ef79d435b1
---
M Makefile
M util/getrevision.sh
2 files changed, 8 insertions(+), 9 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/29/21829/1
diff --git a/Makefile b/Makefile
index fd1fc3b..b2db918 100644
--- a/Makefile
+++ b/Makefile
@@ -530,7 +530,7 @@
# export rule. If Makefile.VCS is not found, version info will be obtained
# using util/getrevision.sh.
ifeq ($(wildcard Makefile.VCS),)
-VERSION ?= $(shell ./util/getrevision.sh --local)
+VERSION ?= $(shell ./util/getrevision.sh --revision)
MAN_DATE ?= $(shell ./util/getrevision.sh --date $(PROGRAM).8.tmpl 2>/dev/null)
else
include Makefile.VCS
diff --git a/util/getrevision.sh b/util/getrevision.sh
index b332d04..cdd9b73 100755
--- a/util/getrevision.sh
+++ b/util/getrevision.sh
@@ -130,8 +130,7 @@
echo "${t}"
}

-# Retrieve local revision info.
-local_revision() {
+revision() {
local r
if git_is_file_tracked "$1" ; then
r=$(git describe $(git_last_commit "$1"))
@@ -158,8 +157,8 @@
this message
-c or --check
test if path is under version control at all
- -l or --local
- local revision information including an indicator for uncommitted changes
+ -r or --revision
+ return unique revision information
-U or --url
URL associated with the latest commit
-d or --date
@@ -188,10 +187,6 @@
-h|--help)
action=show_help;
shift;;
- -l|--local)
- check_action $1
- action=local_revision
- shift;;
-U|--url)
check_action $1
action=scm_url
@@ -200,6 +195,10 @@
check_action $1
action="timestamp +%Y-%m-%d" # refrain from suffixing 'Z' to indicate it's UTC
shift;;
+ -r|--revision)
+ check_action $1
+ action=revision
+ shift;;
-t|--timestamp)
check_action $1
action="timestamp +%Y-%m-%dT%H:%M:%SZ" # There is only one valid time format! ISO 8601

To view, visit change 21829. To unsubscribe, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6689ac24077b3981b471ed69de7cc3ef79d435b1
Gerrit-Change-Number: 21829
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner@gmx.at>