Re: [PATCH v2] tag: support --sort=<spec>
- From
Jeff King <peff@peff.net>
- Date
- Feb 22, 2014, 08:04 UTC
- Message-ID
- <20140222080404.GB1576@sigill.intra.peff.net>
- In-Reply-To
- <1393039762-4843-1-git-send-email-pclouds@gmail.com>
On Sat, Feb 22, 2014 at 10:29:22AM +0700, Nguyễn Thái Ngọc Duy wrote:
Show 5 quoted lines
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > The new prereq GNULINUX is an ugly workaround until people provide > strverscmp compat implementation. I hope that will happen soon as > strverscmp.c does not look very complex.
Should GNULINUX be called HAVE_STRVERSCMP in the Makefile?
Then this:
Show 12 quoted lines
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -721,4 +721,11 @@ void warn_on_inaccessible(const char *path);
> /* Get the passwd entry for the UID of the current process. */
> struct passwd *xgetpwuid_self(void);
>
> +#ifndef __GNU_LIBRARY__
> +static inline int strverscmp(const char *s1, const char *s2)
> +{
> + die("strverscmp() not supported");
> +}
> +#endifbecomes "#ifndef HAVE_STRVERSCMP", and this:
Show 10 quoted lines
> diff --git a/t/test-lib.sh b/t/test-lib.sh > index 1531c24..5e8c39a 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -771,6 +771,8 @@ case $(uname -s) in > ;; > esac > > +[ "$(uname -o)" = "GNU/Linux" ] && test_set_prereq GNULINUX > +
can pick up the value from GIT-BUILD-OPTIONS as a prerequisite (see the way we handle NO_PERL for an example). Though if we can just grab the glibc version as a fallback, we can do away with that completely.
-Peff