Do not complain if no committer identifier can be written to the reflog.

git clone leaves a half-baked clone without the HEAD ref and no working
tree, but with the full repository, if it cannot find the committer
information in the GECOS field. For a first-time user this may be
puzzling since git clone may be the very first git command to be tried.

The reflog is entirely local information, and the warning about the
missing information is printed anyway, so there is a hint for the user
how to fill it in.
This commit is contained in:
Johannes Sixt
2007-01-24 09:37:48 +01:00
parent 9983977758
commit 4feaf032d3

2
refs.c
View File

@@ -958,7 +958,7 @@ static int log_ref_write(struct ref_lock *lock,
lock->log_file, strerror(errno));
}
committer = git_committer_info(1);
committer = git_committer_info(0);
if (msg) {
maxlen = strlen(committer) + strlen(msg) + 2*40 + 5;
logrec = xmalloc(maxlen);