release branches are detected by checking if "git" is not in RELEASE
This changes "N-64706-g2f71aeb" to "n2.3-8-g2f71aeb"
for git master theres no change
This should improve the readability of lists of versions which come from
more than 1 release branch or master + release. fate.ffmpeg.org is
one possible example
Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ee606fd0317df202b59946cf9b738c0a01056316)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1f4d779e87050111f831f24645580f04e0b1917b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -2,7 +2,11 @@ |
2 | 2 |
|
3 | 3 |
# check for git short hash |
4 | 4 |
if ! test "$revision"; then |
5 |
- revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) |
|
5 |
+ if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then |
|
6 |
+ revision=$(cd "$1" && git describe --tags --match N 2> /dev/null) |
|
7 |
+ else |
|
8 |
+ revision=$(cd "$1" && git describe --tags --always 2> /dev/null) |
|
9 |
+ fi |
|
6 | 10 |
fi |
7 | 11 |
|
8 | 12 |
# Shallow Git clones (--depth) do not have the N tag: |