From: Junio C Hamano <gitster@pobox.com>
To: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: "commit --author=..." does not work if global email and name is not set
Date: Tue, 09 Apr 2019 15:31:45 +0900 [thread overview]
Message-ID: <xmqq7ec38zam.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAA01CspJAPnBFsQsXP4Dpweeg6oBVj==TB0aEnK5o1Et5zS30Q@mail.gmail.com> (Piotr Krukowiecki's message of "Mon, 8 Apr 2019 13:55:25 +0200")
Piotr Krukowiecki <piotr.krukowiecki@gmail.com> 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 test scripts and by real people who log into that machine,
> so this is not possible.
> ...
> Do you mean following?
>
> 1. set default user (user.name, user.email) to "automatic test user"
> on that machine
> 2. set commit hook to prevent commits with "automatic test user" AUTHOR
> 3. scripts will set AUTHOR (--author) to for example "script X" or
> "automatic script user" - different than the default user
> 4. real users will set AUTHOR to their own identity (--author=me)
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.
If that cannot be arranged, something like 4. may have to serve as a
rough approximation; that sound like the best you could do under
that limitation without breaking the general usability of the
system.
next prev parent reply other threads:[~2019-04-09 6:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 7:34 "commit --author=..." does not work if global email and name is not set Piotr Krukowiecki
2019-04-05 8:11 ` Junio C Hamano
2019-04-06 18:25 ` Jakub Narebski
2019-04-08 6:57 ` Junio C Hamano
2019-04-08 9:54 ` Piotr Krukowiecki
2019-04-08 11:06 ` Jakub Narebski
2019-04-08 11:55 ` Piotr Krukowiecki
2019-04-09 6:31 ` Junio C Hamano [this message]
2019-04-09 7:03 ` Piotr Krukowiecki
2019-04-09 7:43 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7ec38zam.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=piotr.krukowiecki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).