Re: "commit --author=..." does not work if global email and name is not set

2019-04-09 Thread Jakub Narebski
Piotr Krukowiecki writes: > On Mon, Apr 8, 2019 at 1:06 PM Jakub Narebski wrote: >> Piotr Krukowiecki writes: On Sat, Apr 6, 2019 at 8:25 PM Jakub Narebski wrote: > > Better though is to focus on what you want, namely to prevent accidental > commits without specified author, in

Re: "commit --author=..." does not work if global email and name is not set

2019-04-09 Thread Piotr Krukowiecki
On Tue, Apr 9, 2019 at 8:31 AM Junio C Hamano wrote: > I do not think 4. is what Jakub meant, which is to make the author > and committer identity for real humans come from the configuration > that becomes in effect automatically by merely logging in. Unfortunately this is not possible > If tha

Re: "commit --author=..." does not work if global email and name is not set

2019-04-08 Thread Junio C Hamano
Piotr Krukowiecki writes: >> If a real person making commits uses their own account (just on that >> machine), he or she can set up `user.name` and `user.email` settings in >> the per-user Git configuration file > > There is one common "test" (Windows) account which is used both by > automatic te

Re: "commit --author=..." does not work if global email and name is not set

2019-04-08 Thread Piotr Krukowiecki
On Mon, Apr 8, 2019 at 1:06 PM Jakub Narebski wrote: > > Piotr Krukowiecki writes: > > >> On Sat, Apr 6, 2019 at 8:25 PM Jakub Narebski wrote: > >>> > >>> Better though is to focus on what you want, namely to prevent accidental > >>> commits without specified author, instead of how you want to a

Re: "commit --author=..." does not work if global email and name is not set

2019-04-08 Thread Jakub Narebski
Piotr Krukowiecki writes: >> On Sat, Apr 6, 2019 at 8:25 PM Jakub Narebski wrote: >>> >>> Better though is to focus on what you want, namely to prevent accidental >>> commits without specified author, instead of how you want to achieve it, >>> i.e. using --author to provide both author and commi

Re: "commit --author=..." does not work if global email and name is not set

2019-04-08 Thread Piotr Krukowiecki
On Fri, Apr 5, 2019 at 10:12 AM Junio C Hamano wrote: > You can still do > > git -c user.name=me -c user.email=m...@my.addre.ss commit ... [...] > GIT_COMMITTER_NAME=me GIT_COMMITTER_EMAIL=m...@my.addre.ss \ > git commit --author=me ... > > even though it is not any shorter ;-). There are a

Re: "commit --author=..." does not work if global email and name is not set

2019-04-07 Thread Junio C Hamano
Jakub Narebski writes: > As Junio said, the "--author=" sets the author > identity, but not the committer identity; you can work around the issue > with "git -c user.name=me -c user.email=m...@email.my". Having slept on this a bit, I am of two minds here. It certainly is possible to change the

Re: "commit --author=..." does not work if global email and name is not set

2019-04-06 Thread Jakub Narebski
Piotr Krukowiecki writes: > Hi, > > I have a repo downloaded on machines which do automatic tests. > Sometimes I want to make a quick fix there and push back to origin. > Reading git-commit docs I had impression that I can use "--author=me" > and it will work. But it requires setting global user

Re: "commit --author=..." does not work if global email and name is not set

2019-04-05 Thread Junio C Hamano
On Fri, Apr 5, 2019 at 4:35 PM Piotr Krukowiecki wrote: > > Hi, > > I have a repo downloaded on machines which do automatic tests. > Sometimes I want to make a quick fix there and push back to origin. > Reading git-commit docs I had impression that I can use "--author=me" > and it will work. But i

"commit --author=..." does not work if global email and name is not set

2019-04-05 Thread Piotr Krukowiecki
Hi, I have a repo downloaded on machines which do automatic tests. Sometimes I want to make a quick fix there and push back to origin. Reading git-commit docs I had impression that I can use "--author=me" and it will work. But it requires setting global user name and email: ==