From: Shawn Pearce <spearce@spearce.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, Roberto <mrgreiner@gmail.com>,
git@vger.kernel.org
Subject: Re: link user-name with ssh-login
Date: Mon, 19 Mar 2012 14:56:04 -0700 [thread overview]
Message-ID: <CAJo=hJvqr2pKVje490g2k2Wxdf2rrQYsrWQ2eN6bPn84fRxLEQ@mail.gmail.com> (raw)
In-Reply-To: <20120319205747.GB3039@sigill.intra.peff.net>
On Mon, Mar 19, 2012 at 13:57, Jeff King <peff@peff.net> wrote:
> On Mon, Mar 19, 2012 at 12:15:07PM -0700, Junio C Hamano wrote:
>
>> A pre-receive hook that lists the author names of the commits, along the
>> lines of "git log --format='%an <%ae>' $OLD_HEAD..$NEW_HEAD" and compares
>> against the name of the user authenticated against your SSH server would
>> be a way to do this.
>>
>> But that would mean you are forbidding people to accept patches from
>> others, inspect the patches for validity and vouch for them, while giving
>> the credit to them by recoding the author names of the patch authors.
>>
>> Perhaps checking the committer name would suit your situation better. I
>> dunno.
>
> Then you would be forbidding merges of other people's work, no? Even if
> the other person's commits are available in the upstream repo, they
> might be hitting this ref for the first time, and would be generally be
> checked by such a hook.
Most hooks that are trying to do this use "$NEW_HEAD --not --all" to
only examine commits that would be newly reachable. Already reachable
commits are presumed valid. If you want to merge someone else's
commits, just make sure they have already pushed their commits to a
branch somewhere, like a refs/heads/$USER/ sandbox space or something.
next prev parent reply other threads:[~2012-03-19 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 16:58 link user-name with ssh-login Roberto
2012-03-19 19:15 ` Junio C Hamano
2012-03-19 20:57 ` Jeff King
2012-03-19 21:56 ` Shawn Pearce [this message]
2012-03-21 16:30 ` Sitaram Chamarty
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='CAJo=hJvqr2pKVje490g2k2Wxdf2rrQYsrWQ2eN6bPn84fRxLEQ@mail.gmail.com' \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mrgreiner@gmail.com \
--cc=peff@peff.net \
/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).