{"thread":{"id":"46628","subject":"Please fix the useless email prompts","startedAt":"2017-08-19T15:10:29Z","lastAt":"2017-08-23T17:36:37Z","messageCount":13,"participants":["Jeffrey Walton","Junio C Hamano","Patryk Obara","Jeff King","Kaartic Sivaraam","Andrew Ardill","Anatolii Borodin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"326771","messageId":"CAH8yC8=i33rtopVt=sgg0k+P4JQO+1EVpPJ+u5CPGEXKvZ+PBA@mail.gmail.com","threadId":"46628","inReplyTo":null,"subject":"Please fix the useless email prompts","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-08-19T15:10:23Z","receivedAt":"2017-08-19T15:10:29Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"Is it possible to fix the issue shown below?\n\nI'm on a test machine. All I do is update to the latest code, build\nthe library and run the self tests.\n\nThe test user account does not have a name and does not have an email\naddress. There's nothing to provide.\n\nThere's no reason to break my workflows for useless Git policies like\n\"please tell me your email address\". Its not my policy, and there's\nnothing critical about it.\n\nJeff\n\n**********\n\n$ git pull\n\n*** Please tell me who you are.\n\nRun\n\n  git config --global user.email \"you@example.com\"\n  git config --global user.name \"Your Name\"\n\nto set your account's default identity.\nOmit --global to set the identity only in this repository.\n\nfatal: unable to auto-detect email address (got 'test@via.(none)')\n"},{"id":"326773","messageId":"xmqqbmnba50e.fsf@gitster.mtv.corp.google.com","threadId":"46628","inReplyTo":"CAH8yC8=i33rtopVt=sgg0k+P4JQO+1EVpPJ+u5CPGEXKvZ+PBA@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-19T16:36:49Z","receivedAt":"2017-08-19T16:37:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeffrey Walton <noloader@gmail.com> writes:\n\n> Is it possible to fix the issue shown below?\n>\n> I'm on a test machine. All I do is update to the latest code, build\n> the library and run the self tests.\n>\n> The test user account does not have a name and does not have an email\n> address. There's nothing to provide.\n>\n> There's no reason to break my workflows for useless Git policies like\n> \"please tell me your email address\". Its not my policy, and there's\n> nothing critical about it.\n>\n> Jeff\n>\n> **********\n>\n> $ git pull\n>\n> *** Please tell me who you are.\n>\n> Run\n>\n>   git config --global user.email \"you@example.com\"\n>   git config --global user.name \"Your Name\"\n>\n> to set your account's default identity.\n> Omit --global to set the identity only in this repository.\n>\n> fatal: unable to auto-detect email address (got 'test@via.(none)')\n\nHasn't this been asked and answered already?\n\n    https://public-inbox.org/git/CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com/\n\n"},{"id":"326780","messageId":"CAH8yC8mpPRN2y1k07_Jk9QP88=gpLKNWfV3W0QQwXTWxyL5STQ@mail.gmail.com","threadId":"46628","inReplyTo":"xmqqbmnba50e.fsf@gitster.mtv.corp.google.com","subject":"Re: Please fix the useless email prompts","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-08-19T18:02:09Z","receivedAt":"2017-08-19T18:02:15Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"On Sat, Aug 19, 2017 at 12:36 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Jeffrey Walton <noloader@gmail.com> writes:\n>\n>> Is it possible to fix the issue shown below?\n>>\n>> I'm on a test machine. All I do is update to the latest code, build\n>> the library and run the self tests.\n>>\n>> The test user account does not have a name and does not have an email\n>> address. There's nothing to provide.\n>>\n>> There's no reason to break my workflows for useless Git policies like\n>> \"please tell me your email address\". Its not my policy, and there's\n>> nothing critical about it.\n>>\n>> ...\n> Hasn't this been asked and answered already?\n>\n>     https://public-inbox.org/git/CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com/\n\nIts 2017. I'd like the tools to work for me instead of me working for the tools.\n\nJeff\n"},{"id":"326782","messageId":"CAJfL8+QbMPutRLjKMkNaEmvb1pr+8S3-wR-xhk1Y=LgXsW0DLg@mail.gmail.com","threadId":"46628","inReplyTo":"CAH8yC8mpPRN2y1k07_Jk9QP88=gpLKNWfV3W0QQwXTWxyL5STQ@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Patryk Obara","fromEmail":"patryk.obara@gmail.com","sentAt":"2017-08-19T19:17:18Z","receivedAt":"2017-08-19T19:17:54Z","isPatch":false,"sender":{"key":"patryk.obara@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3967?v=4"},"body":"Why you can't just set username as name and username@hostname as mail?\nYou'll do it once and it will be preserved for future. If you use\nvarious accounts for testing, use --system flag for config to store\nthe values in /etc. If you don't want to modify the environment, use\n--local (or no flag) to preserve name in your cloned repository only.\n\n-- \n| ← Ceci n'est pas une pipe\nPatryk Obara\n"},{"id":"326806","messageId":"20170820091807.l23h44gnjajfv5bn@sigill.intra.peff.net","threadId":"46628","inReplyTo":"CAH8yC8mpPRN2y1k07_Jk9QP88=gpLKNWfV3W0QQwXTWxyL5STQ@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-08-20T09:18:07Z","receivedAt":"2017-08-20T09:18:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 19, 2017 at 02:02:09PM -0400, Jeffrey Walton wrote:\n\n> > Hasn't this been asked and answered already?\n> >\n> >     https://public-inbox.org/git/CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com/\n> \n> Its 2017. I'd like the tools to work for me instead of me working for the tools.\n\nIronically, Git used to behave as you requested in 2005. After being\nbombarded with complaints about how Git was too lax in creating commits\nwith bogus ident information, we changed it in 2012. So I don't think\n\"it's 2017\" carries any weight as an argument.\n\nThere are numerous discussions in the archive on this. But my\nrecollection is that the conclusion is:\n\n  - stricter ident checking on balance saves more headaches than it\n    causes, just in terms of numbers\n\n  - the headaches solved by stricter checking are hard to fix (because\n    you unknowingly bake cruft into commit objects, and fixing that\n    requires a history rewrite)\n\n  - the headaches caused by stricter checking are easy to fix (they're\n    obvious when they happen, and \"git -c\" lets you provide a dummy\n    value to override).\n\nWe can revisit any of those conclusions, but I'd want to see a\nthoughtful discussion of the tradeoffs raised in past rounds, not just\n\"the current behavior is inconvenient for me\".\n\n-Peff\n"},{"id":"326813","messageId":"1503224389.2116.5.camel@gmail.com","threadId":"46628","inReplyTo":"20170820091807.l23h44gnjajfv5bn@sigill.intra.peff.net","subject":"Re: Please fix the useless email prompts","fromName":"Kaartic Sivaraam","fromEmail":"kaarticsivaraam91196@gmail.com","sentAt":"2017-08-20T10:19:49Z","receivedAt":"2017-08-20T10:19:02Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On Sun, 2017-08-20 at 05:18 -0400, Jeff King wrote:\n> Ironically, Git used to behave as you requested in 2005. After being\n> bombarded with complaints about how Git was too lax in creating commits\n> with bogus ident information, we changed it in 2012. So I don't think\n> \"it's 2017\" carries any weight as an argument.\n> \n\nI would like to go with the \"don't create commits with bogus\nident\". \"bogus idents\" seem to go against the notion of a \"content\ntracker\" which should *help* identifying the user who was the reason\nbehind the change. It shoudln't encourage users to create \"anonymous\nchanges\". Thus an \"anonymous user\" seems to completely obscure the\nmeaning of a \"content tracker\", at least in my opinion\n\nMoreover, there's no tool that can satisfy *all* of it's users because\nHumans are so diverse in their thoughts and behaviour.\n\n\n-- \nKaartic\n"},{"id":"326817","messageId":"CAH5451m58n8mYvt=BC_t2=EAv0HOOdAWrCHCNEPQ3NVjT174nQ@mail.gmail.com","threadId":"46628","inReplyTo":"20170820091807.l23h44gnjajfv5bn@sigill.intra.peff.net","subject":"Re: Please fix the useless email prompts","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2017-08-20T12:40:04Z","receivedAt":"2017-08-20T12:40:51Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"On 20 August 2017 at 19:18, Jeff King <peff@peff.net> wrote:\n> On Sat, Aug 19, 2017 at 02:02:09PM -0400, Jeffrey Walton wrote:\n>\n>> > Hasn't this been asked and answered already?\n>> >\n>> >     https://public-inbox.org/git/CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com/\n>>\n>> Its 2017. I'd like the tools to work for me instead of me working for the tools.\n>\n> Ironically, Git used to behave as you requested in 2005. After being\n> bombarded with complaints about how Git was too lax in creating commits\n> with bogus ident information, we changed it in 2012.\n\nMaybe I am missing something obvious, but if that's the case then\ncan't we just do the identity check when trying to make new commits,\nin which case you should be able to pull without setting your\nidentity?\n\nRegards,\n\nAndrew Ardill\n"},{"id":"326837","messageId":"CACNzp2k+QM8WZtQ5ROe_e9E-HVQa1znjO1HSY-g8nOVst-Bnng@mail.gmail.com","threadId":"46628","inReplyTo":"CAH8yC8=i33rtopVt=sgg0k+P4JQO+1EVpPJ+u5CPGEXKvZ+PBA@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Anatolii Borodin","fromEmail":"anatoly.borodin@gmail.com","sentAt":"2017-08-20T21:50:00Z","receivedAt":"2017-08-20T21:50:26Z","isPatch":false,"sender":{"key":"anatoly.borodin@gmail.com","avatar":"https://gravatar.com/avatar/59f11f1f45cf5ebb7bcca8da94b43cfe5f596d91c0a3e27ad0d2a861cc2bbce7?d=mp&s=160"},"body":"Hi Jeffrey,\n\n\nOn Sat, Aug 19, 2017 at 5:10 PM, Jeffrey Walton <noloader@gmail.com> wrote:\n> *** Please tell me who you are.\n\nWhich version of git do you use? Do you have user.useConfigOnly set to\ntrue anywhere in the config files?\n\n-- \nMit freundlichen Grüßen,\nAnatolii Borodin\n"},{"id":"326838","messageId":"CACNzp2kao+hu6a2nO=gVaLctzoDauB+xyj=cfQLUdNOXTNKQfQ@mail.gmail.com","threadId":"46628","inReplyTo":"CAH5451m58n8mYvt=BC_t2=EAv0HOOdAWrCHCNEPQ3NVjT174nQ@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Anatolii Borodin","fromEmail":"anatoly.borodin@gmail.com","sentAt":"2017-08-20T21:57:17Z","receivedAt":"2017-08-20T21:57:43Z","isPatch":false,"sender":{"key":"anatoly.borodin@gmail.com","avatar":"https://gravatar.com/avatar/59f11f1f45cf5ebb7bcca8da94b43cfe5f596d91c0a3e27ad0d2a861cc2bbce7?d=mp&s=160"},"body":"Hi Andrew,\n\nOn Sun, Aug 20, 2017 at 2:40 PM, Andrew Ardill <andrew.ardill@gmail.com> wrote:\n> Maybe I am missing something obvious, but if that's the case then\n> can't we just do the identity check when trying to make new commits,\n> in which case you should be able to pull without setting your\n> identity?\n\n`git pull` is `git fetch + git merge / git rebase` in disguise, so we\nshould be ready if git will want to create a merge commit or do a\nrebase automatically (and potentially create new commits with\n`Committer` set to the current user). `git fetch` and `git clone`\nalone, `git branch`, `git checkout` etc don't care about the email (as\nof 2.14.1), even if `user.useConfigOnly` is set to `true`.\n\n\n-- \nMit freundlichen Grüßen,\nAnatolii Borodin\n"},{"id":"326839","messageId":"CAH5451kcb0Y4mm2U804ruqBewB2AV991Hm0_-8ExdEoDTF8DJw@mail.gmail.com","threadId":"46628","inReplyTo":"CACNzp2kao+hu6a2nO=gVaLctzoDauB+xyj=cfQLUdNOXTNKQfQ@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2017-08-20T23:32:24Z","receivedAt":"2017-08-20T23:33:10Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"Hi Anatoli,\n\nOn 21 August 2017 at 07:57, Anatolii Borodin <anatoly.borodin@gmail.com> wrote:\n> On Sun, Aug 20, 2017 at 2:40 PM, Andrew Ardill <andrew.ardill@gmail.com> wrote:\n>> Maybe I am missing something obvious, but if that's the case then\n>> can't we just do the identity check when trying to make new commits,\n>> in which case you should be able to pull without setting your\n>> identity?\n>\n> `git pull` is `git fetch + git merge / git rebase` in disguise, so we\n> should be ready if git will want to create a merge commit or do a\n> rebase automatically (and potentially create new commits with\n> `Committer` set to the current user). `git fetch` and `git clone`\n> alone, `git branch`, `git checkout` etc don't care about the email (as\n> of 2.14.1), even if `user.useConfigOnly` is set to `true`.\n\nIs there any reason `git pull` can't delay that check until the point\nwhere it actually tries to create a new commit? It's fair enough to\nerror if a new commit needs to be made, and there is no user\nconfigured, but for the use cases discussed here it seems a little\neager to error on the chance that the user will be needed.\n\nIt seems nicer for the user if the `git fetch` happens first, and if\nthe merge is not a fast forward, and there is no user configured, that\nthe error pops then. I don't know if this idea of \"do as much as\npossible before erroring\" is consistent with any other errors we\nhandle.\n\nRegards,\n\nAndrew Ardill\n"},{"id":"326840","messageId":"xmqqinhh7pz1.fsf@gitster.mtv.corp.google.com","threadId":"46628","inReplyTo":"CAH5451kcb0Y4mm2U804ruqBewB2AV991Hm0_-8ExdEoDTF8DJw@mail.gmail.com","subject":"Re: Please fix the useless email prompts","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-20T23:56:50Z","receivedAt":"2017-08-20T23:57:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Ardill <andrew.ardill@gmail.com> writes:\n\n> Is there any reason `git pull` can't delay that check until the point\n> where it actually tries to create a new commit? It's fair enough to\n> error if a new commit needs to be made, and there is no user\n> configured, but for the use cases discussed here it seems a little\n> eager to error on the chance that the user will be needed.\n\nI personally do not think it is a good trade-off.\n\nIn theory [*1*], it _is_ possible to delay the \"the given identity\nlooks bogus\" check so that the underlying \"git fetch\" is done\nwithout it, and bypass the check when \"pull\" fast-forwards, as there\nis no need for an extra merge commit in such a case as you noticed.\nWe still do record the bogus identity in the reflog of the HEAD ref,\nbut IIRC, we do not trigger a severe error when a bogus identity is\nonly needed for reflogs.\n\nBut before running \"fetch\", you cannot tell if the \"pull\" will\nfast-forward, so such an \"optimization\" may actually be a net loss\nfor end users, who have to wait for network delay only to be told\nthat you'd end up with a history with bogus identity and need to\nredo the operation after fixing your identity.  Then after that,\nthey are likely to do another \"git pull\", which will avoid the cost\nof retransmission of objects if (and only if) the initial \"git pull\"\nuses remote-tracking branches.\n\n\n[Footnote]\n\n*1* We actually might already do such an \"optimization\"; I didn't\n    check.\n"},{"id":"327044","messageId":"20170823153553.jg4g55f4biqzu5mw@sigill.intra.peff.net","threadId":"46628","inReplyTo":"xmqqinhh7pz1.fsf@gitster.mtv.corp.google.com","subject":"Re: Please fix the useless email prompts","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-08-23T15:35:54Z","receivedAt":"2017-08-23T15:36:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Aug 20, 2017 at 04:56:50PM -0700, Junio C Hamano wrote:\n\n> Andrew Ardill <andrew.ardill@gmail.com> writes:\n> \n> > Is there any reason `git pull` can't delay that check until the point\n> > where it actually tries to create a new commit? It's fair enough to\n> > error if a new commit needs to be made, and there is no user\n> > configured, but for the use cases discussed here it seems a little\n> > eager to error on the chance that the user will be needed.\n> \n> I personally do not think it is a good trade-off.\n> \n> In theory [*1*],\n> [...]\n> *1* We actually might already do such an \"optimization\"; I didn't\n>     check.\n\nI think we already do. Reflogs do not ask for strict identity, and we've\naddressed similar cases (e.g., 1e461c4f1fc which was motivated by\npull.rebase not handling this).\n\n> But before running \"fetch\", you cannot tell if the \"pull\" will\n> fast-forward, so such an \"optimization\" may actually be a net loss\n> for end users, who have to wait for network delay only to be told\n> that you'd end up with a history with bogus identity and need to\n> redo the operation after fixing your identity.  Then after that,\n> they are likely to do another \"git pull\", which will avoid the cost\n> of retransmission of objects if (and only if) the initial \"git pull\"\n> uses remote-tracking branches.\n\nI agree that in the common case where the command might or might not\nneed to create a commit, it's nicer if we tell the user up front.\n\nBut there are also cases where the user can reasonably expect that a\ncommit will not need to be created. Certainly --ff-only is one hint. But\nin general a pull-only repository for testing will just see repeated\nfetch+fast-forward pulls. People with that kind of setup would see it as\na regression if pull started failing to say \"I don't know yet whether\nwe'll need to create a commit, but I'm failing early to let you know\nthat it won't work\".\n\nIf we could reliably tell the difference between those two cases, it\nmight be worth doing the up-front check. But I'm not sure we can do that\nwithout declaring that people in the ff-only case should be using a\ndifferent workflow (e.g., fetch + \"reset --hard\").\n\n-Peff\n"},{"id":"327053","messageId":"xmqqy3qayyn5.fsf@gitster.mtv.corp.google.com","threadId":"46628","inReplyTo":"20170823153553.jg4g55f4biqzu5mw@sigill.intra.peff.net","subject":"Re: Please fix the useless email prompts","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-08-23T17:36:30Z","receivedAt":"2017-08-23T17:36:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> If we could reliably tell the difference between those two cases, it\n> might be worth doing the up-front check. But I'm not sure we can do that\n> without declaring that people in the ff-only case should be using a\n> different workflow (e.g., fetch + \"reset --hard\").\n\nYup, it _might_ be nicer but I tend to think probably it is not\nworth the potential trouble.\n\nThanks.\n"}]}