]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Don't show unclean in version string for now
authorTravis Cross <tc@traviscross.com>
Fri, 20 Jul 2012 05:12:11 +0000 (05:12 +0000)
committerTravis Cross <tc@traviscross.com>
Fri, 20 Jul 2012 05:12:29 +0000 (05:12 +0000)
Showing whether the git repository is clean at the time of build will
be useful, but currently something in our bootstrap/configure/early
make process is causing the tree to look unclean at just the wrong
moment and clean builds are showing up as unclean.

build/print_git_revision.c

index 6b11646c8e16224944bac66ec68160a909b035e1..73580038329e816c10e448c5e4fb59c55cf4f14f 100644 (file)
@@ -9,6 +9,8 @@
 #include <sys/wait.h>
 #include <time.h>
 
+static int show_unclean = 0;
+
 static int sys(char *buf, int buflen, char *cmd) {
   int i, p[2];
   if (pipe(p)) return 255;
@@ -50,7 +52,7 @@ int main(int argc, char **argv) {
   if ((sys1(xcommit,sizeof(xcommit),"git rev-list -n1 --abbrev=10 --abbrev-commit HEAD")))
     return 1;
   snprintf(xver,sizeof(xver),"+git~%s~%s",xfdate,xcommit);
-  if ((sys(NULL,0,"git diff-index --quiet HEAD"))) {
+  if (show_unclean && (sys(NULL,0,"git diff-index --quiet HEAD"))) {
     char buf[256], now[256]; time_t now_t=time(NULL); struct tm *now_tm;
     if (!(now_tm=gmtime(&now_t))) return 1;
     strftime(now,sizeof(now),"%Y%m%dT%H%M%SZ",now_tm);