author | Jonathan Nieder <jrnieder@gmail.com> | |
Sun, 2 May 2010 08:57:12 +0000 (03:57 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 4 May 2010 22:28:08 +0000 (15:28 -0700) | ||
commit | fb7749e4e4d4d9fef61f35b2f8b40f80c2d5942f | |
tree | b20a843575f1aaf65a68b132a7fc902378f5be21 | tree | snapshot |
parent | 3bf7886705b4ea7189f046fa5258fdf6edcdbe23 | commit | diff |
commit --amend: cope with missing display name
Though I have not seen this in the wild, it has been said that there
are likely to be git repositories converted from other version control
systems with an invalid ident line like this one:
author <user@example.com> 18746342 +0000
Because there is no space between the (empty) user name and the email
address, commit --amend chokes. When searching for a
space-left-bracket sequence on the ident line, it finds it in the
committer line, ending up utterly confused.
Better for commit --amend to treat this like a valid ident line with
empty username and complain.
The tests remove the questionable commit objects after use so there is
no chance for them to confuse later tests.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Though I have not seen this in the wild, it has been said that there
are likely to be git repositories converted from other version control
systems with an invalid ident line like this one:
author <user@example.com> 18746342 +0000
Because there is no space between the (empty) user name and the email
address, commit --amend chokes. When searching for a
space-left-bracket sequence on the ident line, it finds it in the
committer line, ending up utterly confused.
Better for commit --amend to treat this like a valid ident line with
empty username and complain.
The tests remove the questionable commit objects after use so there is
no chance for them to confuse later tests.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c | diff | blob | history | |
t/t7509-commit.sh | diff | blob | history |