Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [PATCH 1/3] GIT-VERSION-GEN: make use of git describe --dirty

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:49:54

Mathias Lafeldt [off-list ref] writes:
Mathias Lafeldt wrote:
quoted
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index d441d88..5c226f6 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -16,6 +16,10 @@ elif test -d .git -o -f .git &&
        case "$VN" in
        *$LF*) (exit 1) ;;
        v[0-9]*)
+               # As of Git v1.6.6, we can use "git describe --dirty" to
+               # determine if the working tree is dirty. However, to still
+               # have nice version numbers when building Git with older
+               # versions of git installed, we keep using plumbing.
                git update-index -q --refresh
                test -z "$(git diff-index --name-only HEAD --)" ||
                VN="$VN-dirty" ;;
Any feedback would be welcome.
I like it, also because people who use GIT-VERSION-GEN from git
repository as inspiration would get to know more modern technique.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help