]> git.ipfire.org Git - thirdparty/git.git/commit
remote: use parse_config_key
authorThomas Gummerer <t.gummerer@gmail.com>
Tue, 16 Feb 2016 09:47:49 +0000 (10:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Feb 2016 21:33:12 +0000 (13:33 -0800)
commitbc60f8a77c6e676225810f33117abcf9117b1c1e
tree1f2f1ea5d9fc6bd9b26c5a5653d68b6be03a41d0
parent30f302f7e7f407c0444b32e264aaa72c4081011e
remote: use parse_config_key

95b567c7 ("use skip_prefix to avoid repeating strings") transformed
calls using starts_with() and then skipping the length of the prefix to
skip_prefix() calls.  In remote.c there are a few calls like:

  if (starts_with(foo, "bar"))
      foo += 3

These calls weren't touched by the aformentioned commit, but can be
replaced by calls to parse_config_key(), to simplify the code and
clarify the intentions.  Do that.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c