History

setlocalversion: add git-svn support

Print svn revision in addition to git info on git-svn repos.

Peter Korsgaard committed 17 years ago

Commit ff80aa91 parent 167d6a01 file · +5 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/setlocalversion+5−0
@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then · 18 unmodified lines
1919 fi
2020 fi
2121
22+ # Is this git on svn?
23+ if git config --get svn-remote.svn.url >/dev/null; then
24+ printf -- '-svn%s' "`git-svn find-rev $head`"
25+ fi
26+
2227 # Are there uncommitted changes?
2328 git update-index --refresh --unmerged > /dev/null
2429 if git diff-index --name-only HEAD | grep -v "^scripts/package" \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t