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:
Junio C Hamano
2007-02-02 23:47:15 -08:00
6 changed files with 46 additions and 32 deletions

View File

@@ -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;
}