Fix mono version for git
authorAndreas Färber <afaerber@mono-cvs.ximian.com>
Fri, 26 Mar 2010 10:56:10 +0000 (10:56 -0000)
committerAndreas Färber <afaerber@mono-cvs.ximian.com>
Fri, 26 Mar 2010 10:56:10 +0000 (10:56 -0000)
When working on a Git repository that was cloned from a git-svn repo,
such as git://repo.or.cz/mono/afaerber.git, the version is currently
displayed as "tarball" in `mono -V`.

The method used to obtain the revision info from git since r134435 -
searching the log - is independent of git-svn, so no need to check
for .git/svn directory.

* Makefile.am (version.h): Check for pure .git directory only,
fixes SVN revision when using git without git-svn.

This commit is licensed under the MIT X11 license.

svn path=/trunk/mono/; revision=154256

mono/mini/ChangeLog
mono/mini/Makefile.am

index 7225972845fa8ecbeea9d32aac4858ffe64d03ff..19f7ff6f7990997711b638b1c9da4eaf9718a5e5 100755 (executable)
@@ -1,3 +1,10 @@
+2010-03-26  Andreas Faerber  <andreas.faerber@web.de>
+
+       * Makefile.am (version.h): Check for pure .git directory only,
+       fixes SVN revision when using git without git-svn.
+
+       Contributed under MIT/X11 license.
+
 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
 
        * aot-runtime.c: Apply some openbsd changes from openbsd ports.
index 4fe7052d646598acd68ea5513fc55231baf1da1e..093077b1f5674079af14af1524c2836876d763e0 100644 (file)
@@ -586,7 +586,7 @@ EXTRA_DIST = $(common_BURGSRC) TestDriver.cs ldscript ldscript.mono \
        $(posix_sources)
 
 version.h: Makefile
-       if test -d $(top_srcdir)/.git/svn; then svn_info="git log --no-color --first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed -n -e 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,p'"; fi; \
+       if test -d $(top_srcdir)/.git; then svn_info="git log --no-color --first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed -n -e 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,p'"; fi; \
        if test -d $(srcdir)/.svn; then svn_info='svn info'; fi; \
        if test -n "$$svn_info"; then \
                (cd $(top_srcdir); \