All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: Konstantin Khomoutov <kostix+git@007spb.ru>
Cc: Git List <git@vger.kernel.org>
Subject: Re: How to avoid "Please tell me who you are..."?
Date: Fri, 2 Jun 2017 03:07:11 -0400	[thread overview]
Message-ID: <CAH8yC8nGR1heD9_xRuHRG-oerdoQr6Pi8mT=ZpFhoeH6LaFK2w@mail.gmail.com> (raw)
In-Reply-To: <20170602070052.3lq22arcncuh6rrl@tigra>

On Fri, Jun 2, 2017 at 3:00 AM, Konstantin Khomoutov
<kostix+git@007spb.ru> wrote:
> On Fri, Jun 02, 2017 at 02:02:22AM -0400, Jeffrey Walton wrote:
>
>> I'm working on a test machine. It mostly needs to be a clone of
>> upstream. On occasion it needs to test a particular commit.
>>
>> When I attempt to test a commit it produces:
>>
>>     $ git cherry-pick eb3b27a6a543
>>
>>     *** Please tell me who you are.
> [...]
>> This is a nameless test account, so there is no information to provide.
>>
>> How do I tell Git to ignore these checks?
> [...]
>> Well, they don't exist so there's nothing to set.
>>
>> The machine below its a CubieBoard used for testing. I remote into it
>> with test@. As a matter of policy, no check-ins occur on it. Other
>> than the password database and authroized_keys file, there is no
>> information on it to be lost or stolen.
>
> `git cherry-pick` wants to record a commit.  A commit in Git always
> possess the information on "the committer" -- whoever recorded the
> commit (it might be distinct from the commit author, as is the case with
> cherry-picking).  There's no way to not set the committer.
>
> I envision two ways to get around this situation:
>
> 1) Patch the ~/.whatevershellrc of your test account to set this
>    information by setting and exporting the GIT_AUTHOR_NAME and
>    GIT_AUTHOR_EMAIL env. variables (and may be others -- see the
>    "git" manual page; run `git help git`).
>
>    May be even add it in /etc/skel to make all accounts create inherit
>    it.
>
> 2) Set these parameters in the repository you're working with.
>
>    While Git suggests you to pass "--global" to the `git config`
>    invocations, it's perfectly OK to use "--local" with them (which is
>    IIRC the default, if not supplied) to make these settings be recorded
>    in the repository's configuration rather than in ~/.gitconfig.
>
> 3) Pass these options explicitly to Git invocations or make a shell
>    alias which would do so, like with
>
>    function git() {
>      command git \
>                 -c user.name='Joe Tester' \
>                 -c user.email=tester@acme.corp \
>                 "$@"
>    }
>
> I'd personally go with (2).

Thanks.

Is there no switch? Its the most efficient way to accomplish the task.

Jeff

  reply	other threads:[~2017-06-02  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  6:02 How to avoid "Please tell me who you are..."? Jeffrey Walton
     [not found] ` <532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com>
2017-06-02  6:37   ` Jeffrey Walton
2017-06-06 22:32     ` Junio C Hamano
2017-06-02  7:00 ` Konstantin Khomoutov
2017-06-02  7:07   ` Jeffrey Walton [this message]
2017-06-02  7:15     ` Junio C Hamano
2017-06-02  7:38       ` Ævar Arnfjörð Bjarmason
2017-06-02 23:50         ` Junio C Hamano

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='CAH8yC8nGR1heD9_xRuHRG-oerdoQr6Pi8mT=ZpFhoeH6LaFK2w@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kostix+git@007spb.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.