diff options
author | René Scharfe <l.s.r@web.de> | 2014-08-30 11:46:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-02 10:36:42 -0700 |
commit | be0b3f822b6375028b25f62894056e63cb7c3ce4 (patch) | |
tree | 4a5b9b9a2bb6d472f4a5e57a402c27d3996910e9 /pack-write.c | |
parent | 96db324a73fdada6fbe7b63221986f8f18cc63b0 (diff) | |
download | git-be0b3f822b6375028b25f62894056e63cb7c3ce4.tar.gz |
connect: simplify check_ref() using skip_prefix() and starts_with()
Both callers of check_ref() pass in NUL-terminated strings for name.
Remove the len parameter and then use skip_prefix() and starts_with()
instead of memcmp() to check if it starts with certain strings. This
gets rid of several magic string length constants and a strlen() call.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-write.c')
0 files changed, 0 insertions, 0 deletions