summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-09 18:33:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-09 18:33:28 (GMT)
commite91ae32a01ffe294b8510c1d8cd7138493a0712f (patch)
tree461b9dacf6c1e8adf5f59251af093dc7c407091f /pretty.c
parent72c779457cd72928e36f2bc43c3ff7f3ae7b77c3 (diff)
parent67a31f612830e79fe768ac886ed9ef7eadd8fb10 (diff)
downloadgit-e91ae32a01ffe294b8510c1d8cd7138493a0712f.zip
git-e91ae32a01ffe294b8510c1d8cd7138493a0712f.tar.gz
git-e91ae32a01ffe294b8510c1d8cd7138493a0712f.tar.bz2
Merge branch 'jk/skip-prefix'
* jk/skip-prefix: http-push: refactor parsing of remote object names imap-send: use skip_prefix instead of using magic numbers use skip_prefix to avoid repeated calculations git: avoid magic number with skip_prefix fetch-pack: refactor parsing in get_ack fast-import: refactor parsing of spaces stat_opt: check extra strlen call daemon: use skip_prefix to avoid magic numbers fast-import: use skip_prefix for parsing input use skip_prefix to avoid repeating strings use skip_prefix to avoid magic numbers transport-helper: avoid reading past end-of-string fast-import: fix read of uninitialized argv memory apply: use skip_prefix instead of raw addition refactor skip_prefix to return a boolean avoid using skip_prefix as a boolean daemon: mark some strings as const parse_diff_color_slot: drop ofs parameter
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index c93c14b..b5cf3d5 100644
--- a/pretty.c
+++ b/pretty.c
@@ -40,10 +40,9 @@ static int git_pretty_formats_config(const char *var, const char *value, void *c
const char *fmt;
int i;
- if (!starts_with(var, "pretty."))
+ if (!skip_prefix(var, "pretty.", &name))
return 0;
- name = var + strlen("pretty.");
for (i = 0; i < builtin_formats_len; i++) {
if (!strcmp(commit_formats[i].name, name))
return 0;