mirror of
https://github.com/git/git.git
synced 2026-03-14 10:53:25 +01:00
Merge branch 'master' into next
* master: core-tutorial: http reference link fix Tutorial-2: Adjust git-status output to recent reality. Tutorial: fix asciidoc formatting of "git add" section. Don't leak file descriptors from unavailable pack files. doc: hooks.txt said post-commit default sends an email, it doesn't Disallow invalid --pretty= abbreviations
This commit is contained in:
3
commit.c
3
commit.c
@@ -47,7 +47,8 @@ enum cmit_fmt get_commit_format(const char *arg)
|
||||
if (*arg == '=')
|
||||
arg++;
|
||||
for (i = 0; i < ARRAY_SIZE(cmt_fmts); i++) {
|
||||
if (!strncmp(arg, cmt_fmts[i].n, cmt_fmts[i].cmp_len))
|
||||
if (!strncmp(arg, cmt_fmts[i].n, cmt_fmts[i].cmp_len) &&
|
||||
!strncmp(arg, cmt_fmts[i].n, strlen(arg)))
|
||||
return cmt_fmts[i].v;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user