{"thread":{"id":"49729","subject":"[RFE] Please add name and email to git credentials","startedAt":"2018-11-01T10:20:31Z","lastAt":"2018-11-02T17:56:09Z","messageCount":13,"participants":["Nicolas Mailhot","Ævar Arnfjörð Bjarmason","Christian Couder","Randall S. Becker","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"362157","messageId":"6d8ef01ad9eb08d90cb9848eeaeabe6784b7b3e3.camel@laposte.net","threadId":"49729","inReplyTo":null,"subject":"[RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-01T09:59:54Z","receivedAt":"2018-11-01T10:20:31Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Hi,\n\nA dev persona is not just a username, please add email (and probably\nalso name) support to git credentials so the correct set for a repo url\nis automatically picked up by git\n\nRegards,\n\n-- \nNicolas Mailhot\n\n"},{"id":"362162","messageId":"87zhutjb3t.fsf@evledraar.gmail.com","threadId":"49729","inReplyTo":"6d8ef01ad9eb08d90cb9848eeaeabe6784b7b3e3.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-01T11:22:46Z","receivedAt":"2018-11-01T11:22:52Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 01 2018, Nicolas Mailhot wrote:\n\n> A dev persona is not just a username, please add email (and probably\n> also name) support to git credentials so the correct set for a repo url\n> is automatically picked up by git\n\nThe \"git-credential\" helper needs to look at a URL like\ngit@github.com:git/git.git and decide that protocol=ssh, username=git,\nhost=github.com, path=git/git.git etc, because that's the credential we\nneed to lookup to push to.\n\nWhere would we get an E-Mail to lookup to pass to the helper? Are you\njust asking that the helper git the result of $(git config user.name &&\ngit config user.email)? If so why can't it just look this up itself?\n"},{"id":"362163","messageId":"b2895479becfa9213935804aceaf4881c49073e8.camel@laposte.net","threadId":"49729","inReplyTo":"6d8ef01ad9eb08d90cb9848eeaeabe6784b7b3e3.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-01T11:32:16Z","receivedAt":"2018-11-01T11:32:20Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Le jeudi 01 novembre 2018 à 10:59 +0100, Nicolas Mailhot a écrit :\n> Hi,\n> \n> A dev persona is not just a username, please add email (and probably\n> also name) support to git credentials so the correct set for a repo\n> url\n> is automatically picked up by git\n\nSo, just in case it was not clear enough, allow things in .gitconfig\nlike\n\n[credential \"https://pkgs.fedoraproject.org/\"]\nusername = doe4ever\nname = John Doe\nemail = foo4ever@fedoraproject.org\n[credential \"https://gitlab.corp.com/\"]\nusername = jdoe56874\nname = John Doe, Snr Engineer\nemail = john.doe@corp.com\n\nInstead of just\n\n[user]\nname = John Doe\nemail =  john.doe@corp.com\n[credential \"https://pkgs.fedoraproject.org/\"]\nusername = doe4ever\nemail = foo@fedoraproject.org\n[credential \"https://gitlab.corp.com/\"]\nusername = jdoe56874\n\nand drat, I've commited to XXX with the wrong name/email again\n\n-- \nNicolas Mailhot\n\n"},{"id":"362172","messageId":"6f3d8c49e1d44ab20d4169e5254364cba707f1af.camel@laposte.net","threadId":"49729","inReplyTo":"87zhutjb3t.fsf@evledraar.gmail.com","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-01T12:34:23Z","receivedAt":"2018-11-01T12:34:28Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Le jeudi 01 novembre 2018 à 12:22 +0100, Ævar Arnfjörð Bjarmason a\nécrit :\n> \n> Where would we get an E-Mail to lookup to pass to the helper? Are you\n> just asking that the helper git the result of $(git config user.name\n> &&\n> git config user.email)? If so why can't it just look this up itself?\n\n\nSo, just in case it was not clear enough, allow things in .gitconfig\nlike\n\n[credential \"https://pkgs.fedoraproject.org/\"]\nusername = doe4ever\nname = John Doe\nemail = doe4ever@fedoraproject.org\n[credential \"https://gitlab.corp.com/\"]\nusername = jdoe56874\nname = John Doe, Snr Engineer\nemail = john.doe@corp.com\n\nInstead of just\n\n[user]\nname = John Doe\nemail =  john.doe@corp.com\n[credential \"https://pkgs.fedoraproject.org/\"]\nusername = doe4ever\n[credential \"https://gitlab.corp.com/\"]\nusername = jdoe56874\n\nand drat, I've commited to XXX with the wrong name/email again\n\n\n-- \nNicolas Mailhot\n\n"},{"id":"362175","messageId":"87wopxj5wr.fsf@evledraar.gmail.com","threadId":"49729","inReplyTo":"6f3d8c49e1d44ab20d4169e5254364cba707f1af.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-01T13:15:00Z","receivedAt":"2018-11-01T13:15:06Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 01 2018, Nicolas Mailhot wrote:\n\n> Le jeudi 01 novembre 2018 à 12:22 +0100, Ævar Arnfjörð Bjarmason a\n> écrit :\n>>\n>> Where would we get an E-Mail to lookup to pass to the helper? Are you\n>> just asking that the helper git the result of $(git config user.name\n>> &&\n>> git config user.email)? If so why can't it just look this up itself?\n>\n>\n> So, just in case it was not clear enough, allow things in .gitconfig\n> like\n>\n> [credential \"https://pkgs.fedoraproject.org/\"]\n> username = doe4ever\n> name = John Doe\n> email = doe4ever@fedoraproject.org\n> [credential \"https://gitlab.corp.com/\"]\n> username = jdoe56874\n> name = John Doe, Snr Engineer\n> email = john.doe@corp.com\n>\n> Instead of just\n>\n> [user]\n> name = John Doe\n> email =  john.doe@corp.com\n> [credential \"https://pkgs.fedoraproject.org/\"]\n> username = doe4ever\n> [credential \"https://gitlab.corp.com/\"]\n> username = jdoe56874\n>\n> and drat, I've commited to XXX with the wrong name/email again\n\nAaaah! So really you just want to set user.{name,email} if you match a\ngiven URL in the project, and this per-se has nothing to do with\ncredentials..\n\nYeah that's a fair request. Although I think tying that up with\ncredential.* doesn't make sense because we'd:\n\n 1) Need yet another place (config, env vars, now this...) to search for\n    what we're putting in the commit object.\n\n 2) Users want to configure this for e.g. different URLs even though\n    they don't need different credentials for the two.\n\nI'm too lazy to dig up the thread, but there's been a discussion before\nof extending the IncludeIf syntax to support more things that \"gitdir\",\ne.g. matching on the remote URL.\n\nSo then you'd do:\n\n    [credential \"https://pkgs.fedoraproject.org/\"]\n    username = doe4ever\n    [IncludeIf \"remote:https://pkgs.fedoraproject.org/*\"]\n    path ~/.gitconfig.d/fedoraproject.config\n\nBut now what you need to do is clone all the projects in\ne.g. ~/git/fedoraproject/* and do:\n\n    [credential \"https://pkgs.fedoraproject.org/\"]\n    username = doe4ever\n    [IncludeIf \"gitdir:~/g/fedoraproject/*\"]\n    path ~/.gitconfig.d/fedoraproject.config\n"},{"id":"362188","messageId":"CAP8UFD1rTJNOZzFMryY9BNKHUZKE8FUEgw+4jFfnZ7G8KGNrkw@mail.gmail.com","threadId":"49729","inReplyTo":"6f3d8c49e1d44ab20d4169e5254364cba707f1af.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2018-11-01T14:13:10Z","receivedAt":"2018-11-01T14:13:24Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Nov 1, 2018 at 2:31 PM Nicolas Mailhot\n<nicolas.mailhot@laposte.net> wrote:\n>\n> Le jeudi 01 novembre 2018 à 12:22 +0100, Ævar Arnfjörð Bjarmason a\n> écrit :\n> >\n> > Where would we get an E-Mail to lookup to pass to the helper? Are you\n> > just asking that the helper git the result of $(git config user.name\n> > &&\n> > git config user.email)? If so why can't it just look this up itself?\n>\n> So, just in case it was not clear enough, allow things in .gitconfig\n> like\n>\n> [credential \"https://pkgs.fedoraproject.org/\"]\n> username = doe4ever\n> name = John Doe\n> email = doe4ever@fedoraproject.org\n> [credential \"https://gitlab.corp.com/\"]\n> username = jdoe56874\n> name = John Doe, Snr Engineer\n> email = john.doe@corp.com\n>\n> Instead of just\n>\n> [user]\n> name = John Doe\n> email =  john.doe@corp.com\n> [credential \"https://pkgs.fedoraproject.org/\"]\n> username = doe4ever\n> [credential \"https://gitlab.corp.com/\"]\n> username = jdoe56874\n>\n> and drat, I've commited to XXX with the wrong name/email again\n\nHow can Git know when you commit where you will want to push the\ncommit afterwards?\n\nWhat if you want to push the same commit to 2 different places that\nneed different credentials?\n"},{"id":"362191","messageId":"62bf61555a6c2789e959e4f085bfedf28b60f268.camel@laposte.net","threadId":"49729","inReplyTo":"CAP8UFD1rTJNOZzFMryY9BNKHUZKE8FUEgw+4jFfnZ7G8KGNrkw@mail.gmail.com","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-01T14:42:24Z","receivedAt":"2018-11-01T14:42:28Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Le jeudi 01 novembre 2018 à 15:13 +0100, Christian Couder a écrit :\n> \n> How can Git know when you commit where you will want to push the\n> commit afterwards?\n\nYou have an url in the repo config. of course you can change it between\nthe commit and the push, but that's not the general case.\n\nNowadays, most git projects have a preferred git hosting, and your\nname/email with the project match the credentials you use to push\n(otherwise things like gitlab/github issues trackers would not work at\nall).\n\n> What if you want to push the same commit to 2 different places that\n> need different credentials?\n\nThen you do not use git credentials and have to configure all by hand.\nWhich will usually be a major error-prone PITA, so you’ll end up pushing\nto the system that matches the ID you want to se in git logs, and then\npush from this system to others.\n\n-- \nNicolas Mailhot\n\n"},{"id":"362193","messageId":"001601d471ef$a9ccf110$fd66d330$@nexbridge.com","threadId":"49729","inReplyTo":"CAP8UFD1rTJNOZzFMryY9BNKHUZKE8FUEgw+4jFfnZ7G8KGNrkw@mail.gmail.com","subject":"RE: [RFE] Please add name and email to git credentials","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-11-01T14:32:00Z","receivedAt":"2018-11-01T14:56:45Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On November 1, 2018 10:13 AM, Christian Couder wrote:\n> Sent: > To: nicolas.mailhot@laposte.net\n> Cc: git <git@vger.kernel.org>\n> Subject: Re: [RFE] Please add name and email to git credentials\n> \n> On Thu, Nov 1, 2018 at 2:31 PM Nicolas Mailhot\n> <nicolas.mailhot@laposte.net> wrote:\n> >\n> > Le jeudi 01 novembre 2018 à 12:22 +0100, Ævar Arnfjörð Bjarmason a\n> > écrit :\n> > >\n> > > Where would we get an E-Mail to lookup to pass to the helper? Are\n> > > you just asking that the helper git the result of $(git config\n> > > user.name && git config user.email)? If so why can't it just look\n> > > this up itself?\n> >\n> > So, just in case it was not clear enough, allow things in .gitconfig\n> > like\n> >\n> > [credential \"https://pkgs.fedoraproject.org/\"]\n> > username = doe4ever\n> > name = John Doe\n> > email = doe4ever@fedoraproject.org\n> > [credential \"https://gitlab.corp.com/\"] username = jdoe56874 name =\n> > John Doe, Snr Engineer email = john.doe@corp.com\n> >\n> > Instead of just\n> >\n> > [user]\n> > name = John Doe\n> > email =  john.doe@corp.com\n> > [credential \"https://pkgs.fedoraproject.org/\"]\n> > username = doe4ever\n> > [credential \"https://gitlab.corp.com/\"] username = jdoe56874\n> >\n> > and drat, I've commited to XXX with the wrong name/email again\n> \n> How can Git know when you commit where you will want to push the\n> commit afterwards?\n> \n> What if you want to push the same commit to 2 different places that need\n> different credentials?\n\nAgree. You are asking git to change history depending on where pushes are done. Applying a legacy VCS paradigm here? Git has a global view of history. It must be the same everywhere, so if you push to two different places, the history must be the same, because those two places may in turn push to another shared repo. Then who is the authority?\n\nWhat I have managed to do is to associated name and email with config --local so that it binds to the clone and overrides your --global setting. I can have different identities based on what clone I am working on, but once history is created, that's it. If I push from one clone to another, the identity of the clone where I did my first commit is what the second clone sees.\n\nHope this helps.\nRandall\n\n-- Brief whoami:\n NonStop developer since approximately 211288444200000000\n UNIX developer since approximately 421664400\n-- In my real life, I talk too much.\n\n\n\n"},{"id":"362257","messageId":"CAP8UFD0DHGShwo=DnwbSHz3nvRMF9P4GegEzC27uwHLXQ=A4Zw@mail.gmail.com","threadId":"49729","inReplyTo":"62bf61555a6c2789e959e4f085bfedf28b60f268.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2018-11-02T08:27:36Z","receivedAt":"2018-11-02T08:27:52Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Nov 1, 2018 at 3:42 PM Nicolas Mailhot\n<nicolas.mailhot@gmail.com> wrote:\n>\n> Le jeudi 01 novembre 2018 à 15:13 +0100, Christian Couder a écrit :\n> >\n> > How can Git know when you commit where you will want to push the\n> > commit afterwards?\n>\n> You have an url in the repo config. of course you can change it between\n> the commit and the push, but that's not the general case.\n\nIf I did a `git init`, then I have no url in the repo config. Also if\nI cloned from a repo that has a different URL than the sites I have\ncredentials for, then how should git use the URL in the repo config?\n\n> Nowadays, most git projects have a preferred git hosting, and your\n> name/email with the project match the credentials you use to push\n> (otherwise things like gitlab/github issues trackers would not work at\n> all).\n\nI think you are talking about a special need that you have, but it's\nnot the same for everyone. For example I always use my real name\n\"Christian Couder\", and when my email changes, I would like it to\nchange everywhere, so support for .mailmap files in GitHub and GitLab\nfor example would be much more important for me than what you suggest.\n\n> > What if you want to push the same commit to 2 different places that\n> > need different credentials?\n>\n> Then you do not use git credentials and have to configure all by hand.\n> Which will usually be a major error-prone PITA, so you’ll end up pushing\n> to the system that matches the ID you want to se in git logs, and then\n> push from this system to others.\n\nYou could have no user.name and user.email configured in your global\nconfig, and a script that configures those in the local config\ndepending on remote.origin.url. So when you commit in a repo, Git will\nfail if user.name and user.email are not already configured in the\nrepo. It will tell you to configure those, then you just have to run\nyour script to get those configured locally, and you are good to go.\n\nAnother more flexible possibility is what Ævar suggest with\nconditional includes in the config.\n"},{"id":"362258","messageId":"1e3901b9a75a043d9c31d66d98410f3288a7c5be.camel@laposte.net","threadId":"49729","inReplyTo":"CAP8UFD0DHGShwo=DnwbSHz3nvRMF9P4GegEzC27uwHLXQ=A4Zw@mail.gmail.com","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-02T08:57:30Z","receivedAt":"2018-11-02T08:57:37Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Le vendredi 02 novembre 2018 à 09:27 +0100, Christian Couder a écrit :\n> On Thu, Nov 1, 2018 at 3:42 PM Nicolas Mailhot\n> <nicolas.mailhot@gmail.com> wrote:\n> > Le jeudi 01 novembre 2018 à 15:13 +0100, Christian Couder a écrit :\n> > > How can Git know when you commit where you will want to push the\n> > > commit afterwards?\n> > \n> > You have an url in the repo config. of course you can change it\n> > between\n> > the commit and the push, but that's not the general case.\n> \n> If I did a `git init`, then I have no url in the repo config. Also if\n> I cloned from a repo that has a different URL than the sites I have\n> credentials for, then how should git use the URL in the repo config?\n\nThen you have no need or use for git credentials. Where’s the problem? \n\nWill the fact that git credential users, that already have per-repo-url\nsettings in their .gitconfig, will also be able to use this existing\nper-url section to control the mail and name associated with their\nrepos, wake you at night, or something?\n\n> You could have no user.name and user.email configured in your global\n> config, and a script that configures those in the local config\n> depending on remote.origin.url. \n\nOne could use the same arguments to say git credentials is not\nnecessary, it's a maintenance burden, everyone should just script their\nauth needs manually, etc.\n\nAre you arguing for git credentails removal here?\n\nOr are you arguing that having two separate mecanisms in git, to match\nconfig directives to repo urls, is some kind of improvement?\n\nI didn't create or write or specify the way git credential matches repo\nurls. It already exists within git. If you have a problem with the\nmatching logic git credential uses, why are you arguing with me instead\nof taking it up with the maintainers of this logic?\n\nRegards,\n\n-- \nNicolas Mailhot\n\n"},{"id":"362285","messageId":"20181102165110.GA11212@sigill.intra.peff.net","threadId":"49729","inReplyTo":"1e3901b9a75a043d9c31d66d98410f3288a7c5be.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-02T16:51:10Z","receivedAt":"2018-11-02T16:51:13Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 02, 2018 at 09:57:30AM +0100, Nicolas Mailhot wrote:\n\n> Or are you arguing that having two separate mecanisms in git, to match\n> config directives to repo urls, is some kind of improvement?\n\nThere are already are multiple mechanisms (e.g., http.* config). So that\nship has sailed. ;)\n\n> I didn't create or write or specify the way git credential matches repo\n> urls. It already exists within git. If you have a problem with the\n> matching logic git credential uses, why are you arguing with me instead\n> of taking it up with the maintainers of this logic?\n\nI did create the way git credential matches repo urls. And I do not\nthink your proposal is a good idea. The credential system is about\ninteracting with a remote URL, and creating a commit object is a local\noperation. That mismatch leaks through when you work with multiple\nremotes, since it is not clear which URL we would match against when the\noperation does not involve a remote at all.\n\nIf you want to have per-repo name/email for creating commits, right now\nyour option is to have conditional config based on the local filesystem\npath.\n\nElsewhere in this thread[1] Ævar suggested having conditional config\ndirectives based on the presence of a remote. I'm a little hesitant\nthere because it requires the config parsing to depend on the value of\nanother key (introducing subtle timing dependencies). But aside from\nbizarre corner cases (e.g., including config for remote.* via a\nconditional include on the remote.* config), I think it would do what\nyou want and would be generally useful.\n\nThat seems like a more fruitful direction to me.\n\n-Peff\n\n[1] https://public-inbox.org/git/87wopxj5wr.fsf@evledraar.gmail.com/\n"},{"id":"362293","messageId":"841569ad61dd5f4f5424e8c2860a4c01f146c8a1.camel@laposte.net","threadId":"49729","inReplyTo":"20181102165110.GA11212@sigill.intra.peff.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Nicolas Mailhot","fromEmail":"nicolas.mailhot@laposte.net","sentAt":"2018-11-02T17:32:36Z","receivedAt":"2018-11-02T17:32:43Z","isPatch":false,"sender":{"key":"nicolas.mailhot@laposte.net","avatar":null},"body":"Le vendredi 02 novembre 2018 à 12:51 -0400, Jeff King a écrit :\n\nHi,\n\nThank you for reading the RFE.\n\n> I did create the way git credential matches repo urls. And I do not\n> think your proposal is a good idea. The credential system is about\n> interacting with a remote URL, and creating a commit object is a local\n> operation. That mismatch leaks through when you work with multiple\n> remotes, since it is not clear which URL we would match against when\n> the operation does not involve a remote at all.\n\nI don't think it's quite that simple. The id part of creating a commit\nobject is not a local operation at all. You choose the id written in a\ncommit for a specific remote target, it has no use locally, most of us\ndo not need it to reach themselves.\n\nSo yes there is a leak but it’s built in the git commit logic itself.\nIdeally, git would defer resolving <me> in commits to when I push to a\nremote target. I'm sure you’re aware of all the workarounds git users do\nat push time, when they realize the commit <me> is not the good one.\n\nAnd since the leak is built in the commit logic itself, there are no\nperfect solutions that do not involve revisiting how commit works.\n\nSo, unless someone wants to revisit git commit, we’re left with\nimperfect solutions, and git credentials is no worse than another. It\ncertainly fixes my use case fine. You did good work in git credentials.\n\nRegards,\n\n-- \nNicolas Mailhot\n\n"},{"id":"362295","messageId":"20181102175605.GA17353@sigill.intra.peff.net","threadId":"49729","inReplyTo":"841569ad61dd5f4f5424e8c2860a4c01f146c8a1.camel@laposte.net","subject":"Re: [RFE] Please add name and email to git credentials","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-02T17:56:05Z","receivedAt":"2018-11-02T17:56:09Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 02, 2018 at 06:32:36PM +0100, Nicolas Mailhot wrote:\n\n> > I did create the way git credential matches repo urls. And I do not\n> > think your proposal is a good idea. The credential system is about\n> > interacting with a remote URL, and creating a commit object is a local\n> > operation. That mismatch leaks through when you work with multiple\n> > remotes, since it is not clear which URL we would match against when\n> > the operation does not involve a remote at all.\n> \n> I don't think it's quite that simple. The id part of creating a commit\n> object is not a local operation at all. You choose the id written in a\n> commit for a specific remote target, it has no use locally, most of us\n> do not need it to reach themselves.\n\nI don't think that's true. You do not need to have a remote at all to\nuse Git.\n\nBut more importantly, the commit is not in any way tied to a specific\nremote. You might have multiple remotes that are storing many of the\nsame objects. So even if you wanted to somehow assign a segment of\nhistory to a remote, it is not an unambiguous mapping.\n\n> So yes there is a leak but it’s built in the git commit logic itself.\n> Ideally, git would defer resolving <me> in commits to when I push to a\n> remote target. I'm sure you’re aware of all the workarounds git users do\n> at push time, when they realize the commit <me> is not the good one.\n\nYour second sentence is fundamentally at odds with how Git works and its\ndecentralized data model.\n\n> And since the leak is built in the commit logic itself, there are no\n> perfect solutions that do not involve revisiting how commit works.\n> \n> So, unless someone wants to revisit git commit, we’re left with\n> imperfect solutions, and git credentials is no worse than another. It\n> certainly fixes my use case fine. You did good work in git credentials.\n\nSorry, I just don't agree with any of the logic here. That's not how\ncommits work in Git, and all of the solutions are not equally imperfect.\n\n-Peff\n"}]}