summaryrefslogtreecommitdiff
path: root/t/t5515/fetch.br-config-glob-octopus
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-07-23 14:50:35 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-23 13:27:21 -0700
commitf20f3878ac95e254ec6fd22b63cfb6eda67e5ded (patch)
tree11404c85ec117b86b342013d3076725bf584a248 /t/t5515/fetch.br-config-glob-octopus
parentGit 1.7.9.7 (diff)
downloadtgif-f20f3878ac95e254ec6fd22b63cfb6eda67e5ded.tar.xz
commit: check committer identity more strictly
The identity of the committer will ultimately be pulled from the ident code by commit_tree(). However, we make an attempt to check the author and committer identity early, before the user has done any manual work like inputting a commit message. That lets us abort without them having to worry about salvaging the work from .git/COMMIT_EDITMSG. The early check for committer ident does not use the IDENT_STRICT flag, meaning that it would not find an empty name field. The motivation was presumably because we did not want to be too restrictive, as later calls might be more lax (for example, when we create the reflog entry, we do not care too much about a real name). However, because commit_tree will always get a strict identity to put in the commit object itself, there is no point in being lax only to die later (and in fact it is harmful, because the user will have wasted time typing their commit message). Incidentally, this bug was masked prior to 060d4bb, as the initial loose call would taint the later strict call. So the commit would succeed (albeit with a bogus committer line in the commit object), and nobody noticed that our early check did not match the later one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.br-config-glob-octopus')
0 files changed, 0 insertions, 0 deletions