From: Jonathan Nieder <jrnieder@gmail.com>
To: Max Horn <max@quendi.de>
Cc: Christian Couder <chriscool@tuxfamily.org>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Avery Pennarun <apenwarr@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result
Date: Wed, 6 Nov 2013 15:28:05 -0800 [thread overview]
Message-ID: <20131106232805.GD10302@google.com> (raw)
In-Reply-To: <61456C34-834F-4E7B-89D2-9DB45690C9ED@quendi.de>
Max Horn wrote:
> Well, unlike suffixcmp, it is transitive, so it could be used for sorting.
It is not antisymmetric.
prefixcmp("foo", "foobar") < 0
prefixcmp("foobar", "foo") == 0
I can see how it's possible to care about the sign of the return
value, but it's equally possible to care about the sign from
suffixcmp. Neither is suitable as a function for passing to qsort.
Hoping that clarifies,
Jonathan
next prev parent reply other threads:[~2013-11-06 23:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 21:02 [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result Christian Couder
2013-11-06 22:17 ` Jonathan Nieder
2013-11-06 22:56 ` Max Horn
2013-11-06 23:28 ` Jonathan Nieder [this message]
2013-11-06 23:53 ` Max Horn
2013-11-07 0:12 ` Junio C Hamano
2013-11-07 11:04 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131106232805.GD10302@google.com \
--to=jrnieder@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=max@quendi.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).