* What shall we do with the GECOS field again?
@ 2005-09-19 13:48 Petr Baudis
2005-09-19 14:11 ` Kevin O'Riordan
` (3 more replies)
0 siblings, 4 replies; 21+ messages in thread
From: Petr Baudis @ 2005-09-19 13:48 UTC (permalink / raw)
To: git; +Cc: torvalds
Hello,
after today's another confrontation with angry mob of real-world
Cogito users, I decided to revive the old discussion about what part of
the GECOS field should be used to prefill GIT_*_NAME. Linus stated in
<Pine.LNX.4.58.0504171636590.7211@ppc970.osdl.org> that he does not want
to cut based on ',', because it might throw away the first name of gecos
fields in the "Torvalds, Linus" name.
Well, I have to say that from the GECOS fields I saw, none use that
format, but a lot of them used the realname,phone,something,phone,...
format. The other point is, that users usually do not expect their phone
number to end up in their name information in GIT commits, which results
in a very unpleasant surprise (doubly so due to the immutable GIT
nature). Yes, they should check after the first commit if they are happy
with everything, and yes, GECOS is world-readable and therefore they
shouldn't put information they don't want to be public to it. Still they
do and I think GIT shouldn't make them unpleasant surprises.
So my proposal (patch will follow soon) is to cut everything after the
first , or ; from the GECOS field. These are the usual delimiters used
in the GECOS field, and hopefully this will prevent polluting the
realname fields of commit headers with crap and surprising the users.
In the (I think rather rare) situation of the "Baudis, Petr"-like GECOS
fields, this will just result in only the surname being in the realname
field, which seems to be much less harmful and comparably less evil to
me.
Opinions?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: What shall we do with the GECOS field again? 2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis @ 2005-09-19 14:11 ` Kevin O'Riordan 2005-09-19 14:34 ` Matthias Urlichs 2005-09-19 14:30 ` A Large Angry SCM ` (2 subsequent siblings) 3 siblings, 1 reply; 21+ messages in thread From: Kevin O'Riordan @ 2005-09-19 14:11 UTC (permalink / raw) To: git Hi, > [cutting] based on ',', ... might throw away the first name of gecos > fields in the "Torvalds, Linus" name. ... > ... a lot of them used the realname,phone,something,phone,... format. ... > So my proposal ... is to cut everything after the first , or ; from > the GECOS field. ... > In the ... situation of the "Baudis, Petr"-like GECOS fields, this > will just result in only the surname being in the realname field, > which seems to be much less harmful and comparably less evil to me. In case this hasn't been suggested, how about cutting on "," but taking the first and second fields instead of just the first, and then discarding the second if it contains numbers (or is empty, or whatever) ? -kor ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 14:11 ` Kevin O'Riordan @ 2005-09-19 14:34 ` Matthias Urlichs 0 siblings, 0 replies; 21+ messages in thread From: Matthias Urlichs @ 2005-09-19 14:34 UTC (permalink / raw) To: git Hi, Kevin O'Riordan wrote: > In case this hasn't been suggested, how about cutting on "," but taking > the first and second fields instead of just the first, and then > discarding the second if it contains numbers (or is empty, or whatever) ? ... or contains a room name or a street or ... Bah. *If* we want heuristics, then I'd check for the presence of more than one semicolon or comma (semicolon to be checked first). Yes => use the part before the semicolon or comma. No => use the whole field. However, I'd argue that we don't want heuristics, we should cut at the first delimiter, and anybody who wants to change their commit info gets to set an envvar. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - I've got a patent pending on swallowing, oxidation, and chewing gum. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis 2005-09-19 14:11 ` Kevin O'Riordan @ 2005-09-19 14:30 ` A Large Angry SCM 2005-09-19 14:47 ` Matthias Urlichs 2005-09-19 16:06 ` Junio C Hamano 2005-09-19 16:32 ` Nikolai Weibull 3 siblings, 1 reply; 21+ messages in thread From: A Large Angry SCM @ 2005-09-19 14:30 UTC (permalink / raw) To: Petr Baudis; +Cc: git, torvalds Petr Baudis wrote: > Hello, > > after today's another confrontation with angry mob of real-world > Cogito users, I decided to revive the old discussion about what part of > the GECOS field should be used to prefill GIT_*_NAME. Linus stated in > <Pine.LNX.4.58.0504171636590.7211@ppc970.osdl.org> that he does not want > to cut based on ',', because it might throw away the first name of gecos > fields in the "Torvalds, Linus" name. > > Well, I have to say that from the GECOS fields I saw, none use that > format, but a lot of them used the realname,phone,something,phone,... > format. The other point is, that users usually do not expect their phone > number to end up in their name information in GIT commits, which results > in a very unpleasant surprise (doubly so due to the immutable GIT > nature). Yes, they should check after the first commit if they are happy > with everything, and yes, GECOS is world-readable and therefore they > shouldn't put information they don't want to be public to it. Still they > do and I think GIT shouldn't make them unpleasant surprises. > > So my proposal (patch will follow soon) is to cut everything after the > first , or ; from the GECOS field. These are the usual delimiters used > in the GECOS field, and hopefully this will prevent polluting the > realname fields of commit headers with crap and surprising the users. > In the (I think rather rare) situation of the "Baudis, Petr"-like GECOS > fields, this will just result in only the surname being in the realname > field, which seems to be much less harmful and comparably less evil to > me. > > Opinions? > Petr, Your view of GECOS field contents (formatting) does not match my experience. Many organizations, both large and small, have standards and requirements for the contents and formatting of information in the GECOS field. Saying that the user's name is first and a particular punctuation character SHALL be the standard cut point and everyone not happy with the results should explicitly set the Git environment variables is the wrong approach. A better approach is to not use the GECOS field contents at all and force everyone the set the Git environment variables, AND/OR to include the what Git thinks the user's name name might be in the commit message template they're editing (like the file list). ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 14:30 ` A Large Angry SCM @ 2005-09-19 14:47 ` Matthias Urlichs 2005-09-19 16:16 ` A Large Angry SCM 0 siblings, 1 reply; 21+ messages in thread From: Matthias Urlichs @ 2005-09-19 14:47 UTC (permalink / raw) To: git Hi, A Large Angry SCM wrote: > Saying that the user's name is first and a particular punctuation > character SHALL be the standard cut point and everyone not happy with > the results should explicitly set the Git environment variables is the > wrong approach. I disagree. Standard add-user tools use the gecos field in one of two ways: - fullname - fullname,and,some,other,cruft Sure, many organizations bake their own, but I'd argue that the majority doesn't. > AND/OR to include > the what Git thinks the user's name name might be in the commit message > template they're editing (like the file list). I think that's a good idea, as long as people are told how to change it (i.e., an envvar -- NOT by editing the file). -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - On those occasions when the angel managed to get his mind into the twentieth century, it always gravitated to 1950. -- (Terry Pratchett & Neil Gaiman, Good Omens) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 14:47 ` Matthias Urlichs @ 2005-09-19 16:16 ` A Large Angry SCM 2005-09-19 16:34 ` Petr Baudis 0 siblings, 1 reply; 21+ messages in thread From: A Large Angry SCM @ 2005-09-19 16:16 UTC (permalink / raw) To: Matthias Urlichs; +Cc: git Matthias Urlichs wrote: > Hi, A Large Angry SCM wrote: > >>Saying that the user's name is first and a particular punctuation >>character SHALL be the standard cut point and everyone not happy with >>the results should explicitly set the Git environment variables is the >>wrong approach. > > I disagree. Standard add-user tools use the gecos field in one of two ways: s/two/many/ > - fullname > - fullname,and,some,other,cruft - title,name and other stuff - department, name and other stuff - other punctuation, etc. > > Sure, many organizations bake their own, but I'd argue that the majority > doesn't. The point is we should not be telling them what and how to put stuff in the GECOS field. >>AND/OR to include >>the what Git thinks the user's name name might be in the commit message >>template they're editing (like the file list). > > I think that's a good idea, as long as people are told how to change it > (i.e., an envvar -- NOT by editing the file). Yes. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:16 ` A Large Angry SCM @ 2005-09-19 16:34 ` Petr Baudis 0 siblings, 0 replies; 21+ messages in thread From: Petr Baudis @ 2005-09-19 16:34 UTC (permalink / raw) To: A Large Angry SCM; +Cc: Matthias Urlichs, git Dear diary, on Mon, Sep 19, 2005 at 06:16:47PM CEST, I got a letter where A Large Angry SCM <gitzilla@gmail.com> told me that... > >Sure, many organizations bake their own, but I'd argue that the majority > >doesn't. > > The point is we should not be telling them what and how to put stuff in > the GECOS field. The point is that our guess should be something which works for the most people. > >>AND/OR to include > >>the what Git thinks the user's name name might be in the commit message > >>template they're editing (like the file list). > > > >I think that's a good idea, as long as people are told how to change it > >(i.e., an envvar -- NOT by editing the file). > > Yes. I'll change cg-commit to always include the name/email fields in its template. I think it's verbose enough as it is now, though, and I don't want it to bloat it with more generic help text. I've expanded the documentation of cg-commit on the GIT_ variables and that ought to be enough. :-) -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis 2005-09-19 14:11 ` Kevin O'Riordan 2005-09-19 14:30 ` A Large Angry SCM @ 2005-09-19 16:06 ` Junio C Hamano 2005-09-19 16:16 ` Petr Baudis 2005-09-19 16:32 ` Linus Torvalds 2005-09-19 16:32 ` Nikolai Weibull 3 siblings, 2 replies; 21+ messages in thread From: Junio C Hamano @ 2005-09-19 16:06 UTC (permalink / raw) To: Petr Baudis; +Cc: torvalds, git Petr Baudis <pasky@suse.cz> writes: > Well, I have to say that from the GECOS fields I saw, none use that > format, but a lot of them used the realname,phone,something,phone,... > format. > Opinions? If the real world GECOS were either only plain and name,room,blah,... format as you say and assume I think a heuristics like you suggested would be better than the current heuristics of assuming everything is a name, but I haven't seen what "angry mob" actually has so cannot judge. What do popular MUAs do to come up with the real-name fields? Don't they face the same problem, trying to using GECOS? ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:06 ` Junio C Hamano @ 2005-09-19 16:16 ` Petr Baudis 2005-09-19 16:32 ` Linus Torvalds 1 sibling, 0 replies; 21+ messages in thread From: Petr Baudis @ 2005-09-19 16:16 UTC (permalink / raw) To: Junio C Hamano; +Cc: torvalds, git Dear diary, on Mon, Sep 19, 2005 at 06:06:21PM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that... > Petr Baudis <pasky@suse.cz> writes: > > > Well, I have to say that from the GECOS fields I saw, none use that > > format, but a lot of them used the realname,phone,something,phone,... > > format. > > > Opinions? > > If the real world GECOS were either only plain and > name,room,blah,... format as you say and assume I think a > heuristics like you suggested would be better than the > current heuristics of assuming everything is a name, but I > haven't seen what "angry mob" actually has so cannot judge. It uses the name,room,blah,... format. > What do popular MUAs do to come up with the real-name fields? > Don't they face the same problem, trying to using GECOS? mutt: { "gecos_mask", DT_RX, R_NONE, UL &GecosMask, UL "^[^,]*" }, A regular expression used by mutt to parse the GECOS field of a password entry when expanding the alias. By default the regular expression is set to "^[^,]*" which will return the string up to the first "," encountered. If the GECOS field contains a string like "lastname, firstname" then you should set the gecos_mask=".*". -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:06 ` Junio C Hamano 2005-09-19 16:16 ` Petr Baudis @ 2005-09-19 16:32 ` Linus Torvalds 2005-09-19 16:49 ` Junio C Hamano 1 sibling, 1 reply; 21+ messages in thread From: Linus Torvalds @ 2005-09-19 16:32 UTC (permalink / raw) To: Junio C Hamano; +Cc: Petr Baudis, git On Mon, 19 Sep 2005, Junio C Hamano wrote: > > What do popular MUAs do to come up with the real-name fields? > Don't they face the same problem, trying to using GECOS? Since I have my pine installed in git, I could git grep it. It says /* full name is all chars up to first ',' (or whole gcos, if no ',') */ /* replace any & with logname in upper case */ I don't know why the & rule, but there you have it.. The Perl User::pwent module seems to agree, btw (also about '&'): "Interpretation of the gecos field varies between systems, but traditionally holds 4 comma-separated fields containing the user's full name, office location, work phone number, and home phone number. An & in the gecos field should be replaced by the user's properly capitalized login name." I still worry about names of the type "Torvalds, Linus", but maybe that's just not an issue. Linus ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:32 ` Linus Torvalds @ 2005-09-19 16:49 ` Junio C Hamano 2005-09-19 16:59 ` Linus Torvalds ` (2 more replies) 0 siblings, 3 replies; 21+ messages in thread From: Junio C Hamano @ 2005-09-19 16:49 UTC (permalink / raw) To: Linus Torvalds; +Cc: Petr Baudis, git Linus Torvalds <torvalds@osdl.org> writes: > The Perl User::pwent module seems to agree, btw (also about '&'): > > "Interpretation of the gecos field varies between systems, but > traditionally holds 4 comma-separated fields containing the user's > full name, office location, work phone number, and home phone number. > > An & in the gecos field should be replaced by the user's properly > capitalized login name." I vaguelly recall seeing that & somewhere and wondering what they do with mcdonalds ;-) > I still worry about names of the type "Torvalds, Linus", but maybe that's > just not an issue. Does not appear to be. So I'd vote for us doing the "cut at first comma, substitute & with toupper(login[0])+login[1..]". ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:49 ` Junio C Hamano @ 2005-09-19 16:59 ` Linus Torvalds 2005-09-20 4:02 ` Ryan Anderson 2005-09-20 3:12 ` Horst von Brand 2005-09-20 6:30 ` Junio C Hamano 2 siblings, 1 reply; 21+ messages in thread From: Linus Torvalds @ 2005-09-19 16:59 UTC (permalink / raw) To: Junio C Hamano; +Cc: Petr Baudis, git On Mon, 19 Sep 2005, Junio C Hamano wrote: > > I vaguelly recall seeing that & somewhere and wondering what > they do with mcdonalds ;-) Pine uppercases _all_ of the login field. So mcdonalds would be MCDONALDS. Which isn't much better than Mcdonalds, but might explain people out there with all-upcase last names. Linus ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:59 ` Linus Torvalds @ 2005-09-20 4:02 ` Ryan Anderson 2005-09-20 4:13 ` Linus Torvalds 0 siblings, 1 reply; 21+ messages in thread From: Ryan Anderson @ 2005-09-20 4:02 UTC (permalink / raw) To: Linus Torvalds; +Cc: Junio C Hamano, Petr Baudis, git On Mon, Sep 19, 2005 at 09:59:42AM -0700, Linus Torvalds wrote: > On Mon, 19 Sep 2005, Junio C Hamano wrote: > > > > I vaguelly recall seeing that & somewhere and wondering what > > they do with mcdonalds ;-) > > Pine uppercases _all_ of the login field. So mcdonalds would be MCDONALDS. > Which isn't much better than Mcdonalds, but might explain people out > there with all-upcase last names. I think that's more of an Asian response to the confusion westerners have with "family name" vs "given name" and "first name" vs "last name". The simple solution is to convert the "family" name to all upper case and then whatever order is used is no longer ambiguous (assuming you know the convention). That, at least, is my conclusion from seeing Japanese business cards. I could be totally wrong, of course. -- Ryan Anderson sometimes Pug Majere ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-20 4:02 ` Ryan Anderson @ 2005-09-20 4:13 ` Linus Torvalds 0 siblings, 0 replies; 21+ messages in thread From: Linus Torvalds @ 2005-09-20 4:13 UTC (permalink / raw) To: Ryan Anderson; +Cc: Junio C Hamano, Petr Baudis, git On Tue, 20 Sep 2005, Ryan Anderson wrote: > On Mon, Sep 19, 2005 at 09:59:42AM -0700, Linus Torvalds wrote: > > > Pine uppercases _all_ of the login field. So mcdonalds would be MCDONALDS. > > Which isn't much better than Mcdonalds, but might explain people out > > there with all-upcase last names. > > I think that's more of an Asian response to the confusion westerners > have with "family name" vs "given name" and "first name" vs "last name". I'd believe you, except I have this clear memory of it being pretty common in France too. I remember it vividly from the original extfs author: Remy CARD. And I don't think that one was the odd man out. Linus ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:49 ` Junio C Hamano 2005-09-19 16:59 ` Linus Torvalds @ 2005-09-20 3:12 ` Horst von Brand 2005-09-20 6:30 ` Junio C Hamano 2 siblings, 0 replies; 21+ messages in thread From: Horst von Brand @ 2005-09-20 3:12 UTC (permalink / raw) To: Junio C Hamano; +Cc: Linus Torvalds, Petr Baudis, git Junio C Hamano <junkio@cox.net> wrote: > Linus Torvalds <torvalds@osdl.org> writes: > > The Perl User::pwent module seems to agree, btw (also about '&'): > > > > "Interpretation of the gecos field varies between systems, but > > traditionally holds 4 comma-separated fields containing the user's > > full name, office location, work phone number, and home phone number. > > > > An & in the gecos field should be replaced by the user's properly > > capitalized login name." > > I vaguelly recall seeing that & somewhere and wondering what > they do with mcdonalds ;-) You can't use it in that case. > > I still worry about names of the type "Torvalds, Linus", but maybe that's > > just not an issue. > > Does not appear to be. So I'd vote for us doing the "cut at > first comma, substitute & with toupper(login[0])+login[1..]". That is exactly the intent. -- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:49 ` Junio C Hamano 2005-09-19 16:59 ` Linus Torvalds 2005-09-20 3:12 ` Horst von Brand @ 2005-09-20 6:30 ` Junio C Hamano 2 siblings, 0 replies; 21+ messages in thread From: Junio C Hamano @ 2005-09-20 6:30 UTC (permalink / raw) To: Linus Torvalds; +Cc: Petr Baudis, git Junio C Hamano <junkio@cox.net> writes: > Does not appear to be. So I'd vote for us doing the "cut at > first comma, substitute & with toupper(login[0])+login[1..]". I've done this in the proposed updates branch. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis ` (2 preceding siblings ...) 2005-09-19 16:06 ` Junio C Hamano @ 2005-09-19 16:32 ` Nikolai Weibull 2005-09-19 21:21 ` Nikolai Weibull 2005-09-20 1:53 ` Junio C Hamano 3 siblings, 2 replies; 21+ messages in thread From: Nikolai Weibull @ 2005-09-19 16:32 UTC (permalink / raw) To: git Petr Baudis wrote: > So my proposal (patch will follow soon) is to cut everything after the > first , or ; from the GECOS field. These are the usual delimiters used > in the GECOS field, and hopefully this will prevent polluting the > realname fields of commit headers with crap and surprising the users. > In the (I think rather rare) situation of the "Baudis, Petr"-like GECOS > fields, this will just result in only the surname being in the realname > field, which seems to be much less harmful and comparably less evil to > me. If we stop using GECOS, then can we please start using $EMAIL (or perhaps use it regardless of whether we use GECOS or not)? A lot of applications seem to look for $EMAIL and I think that it's universal enough for git to use it as well. To me it seems that both GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL can use it, as I set $EMAIL as EMAIL="Nikolai Weibull <something@something.something>" Perhaps I should provide a patch instead of just putting out requests?, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:32 ` Nikolai Weibull @ 2005-09-19 21:21 ` Nikolai Weibull 2005-09-20 7:10 ` Junio C Hamano 2005-09-20 1:53 ` Junio C Hamano 1 sibling, 1 reply; 21+ messages in thread From: Nikolai Weibull @ 2005-09-19 21:21 UTC (permalink / raw) To: git Nikolai Weibull wrote: > If we stop using GECOS, then can we please start using $EMAIL (or > perhaps use it regardless of whether we use GECOS or not)? A lot of > applications seem to look for $EMAIL and I think that it's universal > enough for git to use it as well. To me it seems that both > GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and > GIT_COMMITTER_EMAIL can use it, as I set $EMAIL as > > EMAIL="Nikolai Weibull <something@something.something>" > > Perhaps I should provide a patch instead of just putting out requests?, Perhaps something like the following patch will do?, nikolai --- diff --git a/ident.c b/ident.c --- a/ident.c +++ b/ident.c @@ -127,18 +127,22 @@ char *get_ident(const char *name, const char date[50]; int i; - if (!name) - name = real_name; - if (!email) - email = real_email; + if (!name && !email && getenv("EMAIL")) { + i = copy(buffer, sizeof(buffer), 0, getenv("EMAIL")); + i = add_raw(buffer, sizeof(buffer), i, " "); + } else { + if (!name) + name = real_name; + if (!email) + email = real_email; + i = copy(buffer, sizeof(buffer), 0, name); + i = add_raw(buffer, sizeof(buffer), i, " <"); + i = copy(buffer, sizeof(buffer), i, email); + i = add_raw(buffer, sizeof(buffer), i, "> "); + } strcpy(date, real_date); if (date_str) parse_date(date_str, date, sizeof(date)); - - i = copy(buffer, sizeof(buffer), 0, name); - i = add_raw(buffer, sizeof(buffer), i, " <"); - i = copy(buffer, sizeof(buffer), i, email); - i = add_raw(buffer, sizeof(buffer), i, "> "); i = copy(buffer, sizeof(buffer), i, date); if (i >= sizeof(buffer)) die("Impossibly long personal identifier"); -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 21:21 ` Nikolai Weibull @ 2005-09-20 7:10 ` Junio C Hamano 0 siblings, 0 replies; 21+ messages in thread From: Junio C Hamano @ 2005-09-20 7:10 UTC (permalink / raw) To: Nikolai Weibull; +Cc: git Nikolai Weibull <mailing-lists.git@rawuncut.elitemail.org> writes: > Perhaps something like the following patch will do?, > nikolai Thanks for the patch. Some nits and requests. (1) Proper commit log message here, with your Signed-off-by line. > + if (!name && !email && getenv("EMAIL")) { > + i = copy(buffer, sizeof(buffer), 0, getenv("EMAIL")); > + i = add_raw(buffer, sizeof(buffer), i, " "); (2) Perhaps have `#define IDENT_ENVIRONMENT "EMAIL"' in cache.h and use it, like we do for other environment variables. (3) Probably you need to validate what is in $EMAIL before trusting it, so that we can guard ourselves from EMAIL in a format that is suitable for other applications but not for us? If you find that the value does not look good, just refuse it with an error message to set more specific GIT_{AUTHOR,COMMITTER}_* environment variables. Unlike GIT_* environment variables, EMAIL is a convention we did not invent ourselves. We cannot expect it to always be formatted to our liking, and more importantly, we should not demand the user to set it to the way we like -- the other application the user originally set EMAIL for might not like what we want. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-19 16:32 ` Nikolai Weibull 2005-09-19 21:21 ` Nikolai Weibull @ 2005-09-20 1:53 ` Junio C Hamano 2005-09-20 10:31 ` Nikolai Weibull 1 sibling, 1 reply; 21+ messages in thread From: Junio C Hamano @ 2005-09-20 1:53 UTC (permalink / raw) To: Nikolai Weibull; +Cc: git Nikolai Weibull <mailing-lists.git@rawuncut.elitemail.org> writes: > If we stop using GECOS, then can we please start using $EMAIL (or > perhaps use it regardless of whether we use GECOS or not)? A lot of > applications seem to look for $EMAIL and I think that it's universal > enough for git to use it as well. To me it seems that both > GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and > GIT_COMMITTER_EMAIL can use it,... I am not convinced $EMAIL is used as widely as you claim above (could you give a list of applications please?), but if it is that sounds like a sensible idea. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: What shall we do with the GECOS field again? 2005-09-20 1:53 ` Junio C Hamano @ 2005-09-20 10:31 ` Nikolai Weibull 0 siblings, 0 replies; 21+ messages in thread From: Nikolai Weibull @ 2005-09-20 10:31 UTC (permalink / raw) To: git Junio C Hamano wrote: > Nikolai Weibull <mailing-lists.git@rawuncut.elitemail.org> writes: > > If we stop using GECOS, then can we please start using $EMAIL (or > > perhaps use it regardless of whether we use GECOS or not)? A lot of > > applications seem to look for $EMAIL and I think that it's universal > > enough for git to use it as well. To me it seems that both > > GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and > > GIT_COMMITTER_EMAIL can use it,... > I am not convinced $EMAIL is used as widely as you claim above (could > you give a list of applications please?), but if it is that sounds > like a sensible idea. I was sadly mistaken. It doesn't seem to be so well-used after all. Here's a list of applications that use it: * mutt (the only one that really counts) * darcs (which also uses DARCS_EMAIL) * various debian utilities (who cares) * Vim's changelog package (which I have written, so that doesn't count) Quite a sad list, so I suppose that there's really no point in it..., nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2005-09-20 10:31 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis 2005-09-19 14:11 ` Kevin O'Riordan 2005-09-19 14:34 ` Matthias Urlichs 2005-09-19 14:30 ` A Large Angry SCM 2005-09-19 14:47 ` Matthias Urlichs 2005-09-19 16:16 ` A Large Angry SCM 2005-09-19 16:34 ` Petr Baudis 2005-09-19 16:06 ` Junio C Hamano 2005-09-19 16:16 ` Petr Baudis 2005-09-19 16:32 ` Linus Torvalds 2005-09-19 16:49 ` Junio C Hamano 2005-09-19 16:59 ` Linus Torvalds 2005-09-20 4:02 ` Ryan Anderson 2005-09-20 4:13 ` Linus Torvalds 2005-09-20 3:12 ` Horst von Brand 2005-09-20 6:30 ` Junio C Hamano 2005-09-19 16:32 ` Nikolai Weibull 2005-09-19 21:21 ` Nikolai Weibull 2005-09-20 7:10 ` Junio C Hamano 2005-09-20 1:53 ` Junio C Hamano 2005-09-20 10:31 ` Nikolai Weibull
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).