version.sh : fix revision in git-svn trees
"git log .. -1" only shows one commit (the last one), so extract the last line (git-svn-id:..) with tail -n 1, instead of the first line (which is the committer's message in case of multi lines body) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21188 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2409c28f21
commit
7d1528e601
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ gitversion() {
|
|||
if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
|
||||
|
||||
# Get the svn revision of the most recent git-svn commit
|
||||
version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | head -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'`
|
||||
version=`git log --pretty=format:'%b' --grep='git-svn-id: svn' -1 | tail -n 1 | perl -ne 'm/@(\d*)/; print "r" . $1;'`
|
||||
mod=""
|
||||
# Is this a git-svn commit?
|
||||
if ! git log HEAD^.. --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then
|
||||
|
|
Loading…
Reference in a new issue