Commit ff80aa97 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Sam Ravnborg

setlocalversion: add git-svn support

Print svn revision in addition to git info on git-svn repos.
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 167d6a02
...@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then ...@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
fi fi
fi fi
# Is this git on svn?
if git config --get svn-remote.svn.url >/dev/null; then
printf -- '-svn%s' "`git-svn find-rev $head`"
fi
# Are there uncommitted changes? # Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null git update-index --refresh --unmerged > /dev/null
if git diff-index --name-only HEAD | grep -v "^scripts/package" \ if git diff-index --name-only HEAD | grep -v "^scripts/package" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment