On 1/26/07, Junio C Hamano <junkio@xxxxxxx> wrote:
The code that uses committer_info() in reflog can barf and die whenever it is asked to update a ref. And I do not think calling ignore_missing_committer_name() upfront like recent receive-pack did in the aplication is a reasonable workaround. What the patch does. - git_committer_info() takes one parameter. It used to be "if this is true, then die() if the name is not available due to bad GECOS, otherwise issue a warning once but leave the name empty". The reason was because we wanted to prevent bad commits from being made by git-commit-tree (and its callers). The value 0 is only used by "git var -l". Now it takes -1, 0 or 1. When set to -1, it does not complain but uses the pw->pw_name when name is not available. Existing 0 and 1 values mean the same thing as they used to mean before. 0 means issue warnings and leave it empty, 1 means barf and die.
enum { CMITR_INFO_PW_NAME = -1, CMITR_INFO_EMPTY = 0, CMITR_INFO_DIE = 1, }; - const char *committer = git_committer_info(CMITR_INFO_DIE); + const char *committer = git_committer_info(CMITR_INFO_PW_NAME); The code becoming increasingly harder to read, doesn't it... - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html