Re: [PATCH v2] tag: support --sort=spec

2014-02-24 Thread Junio C Hamano
Jeff King p...@peff.net writes:

 On Sat, Feb 22, 2014 at 10:29:22AM +0700, Nguyễn Thái Ngọc Duy wrote:

 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@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:

 --- 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);
 +}
 +#endif

 becomes #ifndef HAVE_STRVERSCMP, and this:

 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.

;-)  I like that.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] tag: support --sort=spec

2014-02-24 Thread Duy Nguyen
On Mon, Feb 24, 2014 at 11:39 PM, Junio C Hamano gits...@pobox.com wrote:
 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.

 ;-)  I like that.


Jeff, I'm still waiting if you agree to go with this syntax or put
version before refname before rerolling (either with build time option
like this, or implement the compat function myself).
-- 
Duy
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] tag: support --sort=spec

2014-02-24 Thread Jeff King
On Tue, Feb 25, 2014 at 06:30:35AM +0700, Duy Nguyen wrote:

  +[ $(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.
 
  ;-)  I like that.
 
 
 Jeff, I'm still waiting if you agree to go with this syntax or put
 version before refname before rerolling (either with build time option
 like this, or implement the compat function myself).

Sorry. I didn't respond because I was trying to think of something to
say besides no, I still like mine better. I admit that it's mostly a
gut feeling, and I don't have any argument beyond what I've already
made (your it's like a typecast does make some sense, but I think that
is a convoluted way of thinking about it).

-Peff
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] tag: support --sort=spec

2014-02-22 Thread Jeff King
On Sat, Feb 22, 2014 at 10:29:22AM +0700, Nguyễn Thái Ngọc Duy wrote:

 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@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:

 --- 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);
 +}
 +#endif

becomes #ifndef HAVE_STRVERSCMP, and this:

 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
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html