[Mono-dev] [PATCH] Version fix for git
Andreas Färber
andreas.faerber at web.de
Thu Mar 25 22:05:08 EDT 2010
Am 20.03.2010 um 22:54 schrieb Andreas Färber:
> When working on a Git repository that was cloned from a git-svn
> repo, it is currently displayed as "tarball" in `mono -V`.
>
> The method used to obtain the git revision info - searching the log
> - is independent of git-svn.
> The patch below thus only checks for a .git subdirectory. Any
> objections?
If no one objects, I'll commit this fix tomorrow.
Andreas
> diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am
> index 4fe7052..093077b 100644
> --- a/mono/mini/Makefile.am
> +++ b/mono/mini/Makefile.am
> @@ -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); \
More information about the Mono-devel-list
mailing list