Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144400
b: refs/heads/master
c: a182ad3
h: refs/heads/master
v: v3
  • Loading branch information
Nico Schottelius authored and Sam Ravnborg committed May 1, 2009
1 parent fde6946 commit f58d942
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185
refs/heads/master: a182ad3d0f858f50bb719a48bb35a013e12366c5
13 changes: 6 additions & 7 deletions trunk/scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ cd "${1:-.}" || usage

# Check for git and a git repo.
if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
# Do we have an untagged version?
if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
if tag=`git describe 2>/dev/null`; then
echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
else
printf '%s%s' -g $head
fi
# Do we have an untagged tag?
if atag=`git describe 2>/dev/null`; then
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
# add -g${head}, if there is no usable tag
else
printf '%s%s' -g $head
fi

# Is this git on svn?
Expand Down

0 comments on commit f58d942

Please sign in to comment.