git-commit-vandalism/vcs-svn
Christian Couder 956623157f strbuf: introduce starts_with() and ends_with()
prefixcmp() and suffixcmp() share the common "cmp" suffix that
typically are used to name functions that can be used for ordering,
but they can't, because they are not antisymmetric:

        prefixcmp("foo", "foobar") < 0
        prefixcmp("foobar", "foo") == 0

We in fact do not use these functions for ordering.  Replace them
with functions that just check for equality.

Add starts_with() and end_with() that will be used to replace
prefixcmp() and suffixcmp(), respectively, as the first step.  These
are named after corresponding functions/methods in programming
languages, like Java, Python and Ruby.

In vcs-svn/fast_export.c, there was already an ends_with() function
that did the same thing. Let's use the new one instead while at it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-05 14:12:52 -08:00
..
fast_export.c strbuf: introduce starts_with() and ends_with() 2013-12-05 14:12:52 -08:00
fast_export.h remote-svn: add incremental import 2012-10-07 14:10:17 -07:00
LICENSE Merge branch 'db/delta-applier' into svn-fe 2011-06-15 02:17:51 -05:00
line_buffer.c vcs-svn: drop no-op reset methods 2012-07-05 23:26:51 -05:00
line_buffer.h vcs-svn: drop no-op reset methods 2012-07-05 23:26:51 -05:00
line_buffer.txt vcs-svn: remove buffer_read_string 2011-03-26 00:17:35 -05:00
repo_tree.c Fix a bitwise negation assignment issue spotted by Sun Studio 2011-12-21 10:19:40 -08:00
repo_tree.h Merge branch 'db/svn-fe-code-purge' into svn-fe 2011-05-26 02:12:14 -05:00
sliding_window.c vcs-svn: suppress a signed/unsigned comparison warning 2012-07-05 23:26:53 -05:00
sliding_window.h vcs-svn: cap number of bytes read from sliding view 2011-06-15 02:15:22 -05:00
svndiff.c vcs-svn: suppress a signed/unsigned comparison warning 2012-07-05 23:26:53 -05:00
svndiff.h vcs-svn: skeleton of an svn delta parser 2011-03-27 22:41:38 -05:00
svndump.c remote-svn: add incremental import 2012-10-07 14:10:17 -07:00
svndump.h remote-svn: add incremental import 2012-10-07 14:10:17 -07:00