From: Alex Riesen Date: Fri, 26 Jan 2007 14:20:30 GMT Subject: Re: [PATCH] Allow non-developer to clone, checkout and fetch easier. Message-ID: <81b0412b0701260620v31feedecwfe0565ee846253a9@mail.gmail.com> In-Reply-To: <7v1wli4g8h.fsf_-_@assigned-by-dhcp.cox.net> On 1/26/07, Junio C Hamano 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...