{"thread":{"id":"9518","subject":"[PATCH] Improved hint on how to set identity","startedAt":"2007-08-13T22:05:50Z","lastAt":"2007-08-14T06:32:34Z","messageCount":6,"participants":["Steffen Prohaska","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50662","messageId":"1187042750257-git-send-email-prohaska@zib.de","threadId":"9518","inReplyTo":null,"subject":"[PATCH] Improved hint on how to set identity","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-08-13T22:05:50Z","receivedAt":"2007-08-13T22:05:50Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"Users typically want to set the default for their account. Thus,\nstart the hint with how to achieve that; and only later explain\nhow to restrict identity to a single repository.\n\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n ident.c |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\nI watched someone setting up git, who never used it before.\nThe hint was leading him into the wrong direction. He\ncertainly wanted to set a global default. Let's give users\nthe right hint first.\n\n    Steffen\n\ndiff --git a/ident.c b/ident.c\nindex 6612d17..9b2a852 100644\n--- a/ident.c\n+++ b/ident.c\n@@ -185,11 +185,11 @@ static const char *env_hint =\n \"\\n\"\n \"Run\\n\"\n \"\\n\"\n-\"  git config user.email \\\"you@email.com\\\"\\n\"\n-\"  git config user.name \\\"Your Name\\\"\\n\"\n+\"  git config --global user.email \\\"you@email.com\\\"\\n\"\n+\"  git config --global user.name \\\"Your Name\\\"\\n\"\n \"\\n\"\n-\"To set the identity in this repository.\\n\"\n-\"Add --global to set your account\\'s default\\n\"\n+\"to set your account\\'s default identity.\\n\"\n+\"Omit --global to set the identity only in this repository.\\n\"\n \"\\n\";\n \n const char *fmt_ident(const char *name, const char *email,\n-- \n1.5.3.rc4.96.g6ceb\n"},{"id":"50665","messageId":"7vbqdbf1m2.fsf@assigned-by-dhcp.cox.net","threadId":"9518","inReplyTo":"1187042750257-git-send-email-prohaska@zib.de","subject":"Re: [PATCH] Improved hint on how to set identity","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-13T23:36:53Z","receivedAt":"2007-08-13T23:36:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> writes:\n\n> Users typically want to set the default for their account. Thus,\n> start the hint with how to achieve that; and only later explain\n> how to restrict identity to a single repository.\n\nIf this were about the introductory part of the user manual, I\nwould definitely vote for suggesting the --global one first as\nthe baby steps will be done with one practice/sandbox repository\nand then when the user graduates to work on other projects and\npossibly under a different identity, it would make sense to\nintroduce the non global one as an advanced option.\n\n> I watched someone setting up git, who never used it before.\n> The hint was leading him into the wrong direction.\n\nReal-life new user experience is a very valuable one.  Can you\nelaborate how the hint led in a _wrong_ direction?  What is the\ndefinition of \"wrong\" here?  It may be that not using --global\nis perfectly the correct thing to do.  It really depends on the\nproject and the situation.\n\nThe condition to cause this error message to be shown is\nprobably a borderline, compared to the earlier \"introductory\npart of the manual\" case.  You may have set an identity in one\nrepository without global, and then switched to another\nrepository and saw this message.  In which case you may want to\nuse a different identity or the same one and I would not say\nwhich one is more common in the case for such a \"second\nrepository\".  When you work on two projects, managed by two\ndifferent organizations, it often is that you would want\nper-repository identity.\n\nWas this the first repository for this person to set up?\n"},{"id":"50677","messageId":"06A460CB-BF06-4D9D-9219-4D4EC656EF9B@zib.de","threadId":"9518","inReplyTo":"7vbqdbf1m2.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Improved hint on how to set identity","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-08-14T05:05:59Z","receivedAt":"2007-08-14T05:05:59Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Aug 14, 2007, at 1:36 AM, Junio C Hamano wrote:\n\n> Steffen Prohaska <prohaska@zib.de> writes:\n>\n>> I watched someone setting up git, who never used it before.\n>> The hint was leading him into the wrong direction.\n>\n> Real-life new user experience is a very valuable one.  Can you\n> elaborate how the hint led in a _wrong_ direction?  What is the\n> definition of \"wrong\" here?  It may be that not using --global\n> is perfectly the correct thing to do.  It really depends on the\n> project and the situation.\n\n\"wrong\" == \"more complex\", \"doing work twice\",\n            \"solving a special case instead of the common case\"\n\n\n> The condition to cause this error message to be shown is\n> probably a borderline, compared to the earlier \"introductory\n> part of the manual\" case.  You may have set an identity in one\n> repository without global, and then switched to another\n> repository and saw this message.  In which case you may want to\n> use a different identity or the same one and I would not say\n> which one is more common in the case for such a \"second\n> repository\".  When you work on two projects, managed by two\n> different organizations, it often is that you would want\n> per-repository identity.\n\nmaybe... but my feeling is that the majority of people has only\na single identity. Having multiple identities is, in my opinion,\nadvanced usage, and should be mentioned after the common case.\n\nWould the majority of users want to set up a global identity\nor a per repository identity?\n\nWhatever the majority typically needs should be mentioned first.\n\n\n> Was this the first repository for this person to set up?\n\nIt was the first commit.\n\n\nIt would even be a good idea to remove the gecos auto detection\nand force _everyone_ to explicitly set the identity on the first\ncommit. git may derive something from gecos, but often it is\nnot the correct identity.\n\nI remember when I started, I didn't immediately recognize that\nI need to set my identity (or how to do it). Therefore I ended\nup with different identities on different machines, because the\ninformation derived from gecos varied. And there's still a\nchance that this will happen again. The situation is quite bad,\nbecause it is very hard, if not impossible, to solve later,\nafter your identity was use to build some history, which may\neven have been pushed to the public.\n\n\tSteffen\n"},{"id":"50679","messageId":"7vps1qellx.fsf@assigned-by-dhcp.cox.net","threadId":"9518","inReplyTo":"06A460CB-BF06-4D9D-9219-4D4EC656EF9B@zib.de","subject":"Re: [PATCH] Improved hint on how to set identity","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-14T05:22:34Z","receivedAt":"2007-08-14T05:22:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> writes:\n\n> maybe... but my feeling is that the majority of people has only\n> a single identity. Having multiple identities is, in my opinion,\n> advanced usage, and should be mentioned after the common case.\n\nMy point was that there is nothing that backs up that your\nfeeling of the majority is correct.  I personally do not have\nmuch preference either way and I certainly do not claim that I\nhave better feel of what the majority wants than you do.  I just\nwant to see something more concrete than \"I think majority wants\nthis\" to change what has been there for some time.\n\n> I remember when I started, I didn't immediately recognize that\n> I need to set my identity (or how to do it). Therefore I ended\n> up with different identities on different machines,...\n\nYou might want to search the mailing list archive for message\nfrom Linus why he thinks having different per machine identity\nfor committer field is a good thing.  People have different\ntaste and needs.\n"},{"id":"50681","messageId":"3ED86523-8FEA-4141-BA8A-14FAFD7CD93E@zib.de","threadId":"9518","inReplyTo":"7vps1qellx.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Improved hint on how to set identity","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-08-14T05:54:06Z","receivedAt":"2007-08-14T05:54:06Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Aug 14, 2007, at 7:22 AM, Junio C Hamano wrote:\n\n> Steffen Prohaska <prohaska@zib.de> writes:\n>\n>> maybe... but my feeling is that the majority of people has only\n>> a single identity. Having multiple identities is, in my opinion,\n>> advanced usage, and should be mentioned after the common case.\n>\n> My point was that there is nothing that backs up that your\n> feeling of the majority is correct.  I personally do not have\n> much preference either way and I certainly do not claim that I\n> have better feel of what the majority wants than you do.  I just\n> want to see something more concrete than \"I think majority wants\n> this\" to change what has been there for some time.\n\nI see your point. Yet I do not understand, why people might want\nto have _no_ default identity. I think everyone should have a\ndefault identity. That is what my patch does: tell the user to\nsetup a default account identity first. Per repository identities\ncan be set up later.\n\n\tSteffen\n"},{"id":"50683","messageId":"7v8x8eeid9.fsf@assigned-by-dhcp.cox.net","threadId":"9518","inReplyTo":"3ED86523-8FEA-4141-BA8A-14FAFD7CD93E@zib.de","subject":"Re: [PATCH] Improved hint on how to set identity","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-14T06:32:34Z","receivedAt":"2007-08-14T06:32:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> writes:\n\n> ... I think everyone should have a\n> default identity. That is what my patch does: tell the user to\n> setup a default account identity first. Per repository identities\n> can be set up later.\n\nOnce you put it that way, it makes quite a lot of sense,\nalthough \"should\" might probably be bit too strong a word.\n\nAnd it matches how Documentation/tutorial.txt starts out, to\nmake the suggestions consistent.\n\nWill apply.\n"}]}