diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2013-11-05 22:02:36 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-11-06 13:10:33 -0800 |
commit | 76e08227e5bc8b6e3d208da965d2421911d25ae3 (patch) | |
tree | fffe84cc3010906389eab2e95f80988f1fff4056 /builtin/fetch.c | |
parent | d2e146d8d7052b8482859e64daf2b86c019531f8 (diff) | |
download | git-cc/remote-remove-redundant-postfixcmp.tar.gz |
Rename suffixcmp() to has_suffix() and invert its resultcc/remote-remove-redundant-postfixcmp
Now has_suffix() returns 1 when the suffix is present and 0 otherwise.
The old name followed the pattern anything-cmp(), which suggests
a general comparison function suitable for e.g. sorting objects.
But this was not the case for suffixcmp().
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index bd7a10164f..8eb6cd0582 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -653,7 +653,7 @@ static void find_non_local_tags(struct transport *transport, * to fetch then we can mark the ref entry in the list * as one to ignore by setting util to NULL. */ - if (!suffixcmp(ref->name, "^{}")) { + if (has_suffix(ref->name, "^{}")) { if (item && !has_sha1_file(ref->old_sha1) && !will_fetch(head, ref->old_sha1) && !has_sha1_file(item->util) && |