git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Sebastian Götte" <jaseg@physik.tu-berlin.de>
Cc: git@vger.kernel.org, joel@trustly.com, git@drmicha.warpmail.net
Subject: Re: [PATCH v2 0/1] templates: pre-push hook: check for missing GPG signatures
Date: Thu, 25 Apr 2013 09:50:24 -0700	[thread overview]
Message-ID: <7vy5c64krz.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51791F41.3040203@physik.tu-berlin.de> ("Sebastian Götte"'s message of "Thu, 25 Apr 2013 14:19:13 +0200")

Sebastian Götte <jaseg@physik.tu-berlin.de> writes:

> On 04/24/2013 09:54 PM, Junio C Hamano wrote:
>> None of the above is part of a proper commit log message, is it?
> Fixed (I hope)

Don't hope, instead do.  ;-)

The questions I asked were not requests to explain them to _me_ in a
response like this.  They were the examples of what the proposed
commit log message should have explained what the patch attempts to
do.

>>> -IFS=' '
>> Why?
> Otherwise in the for-loop below the output of the pipe chain is not correctly
> split by newlines. Also AFAIK, this is not needed: I think the default
> '<space><tab><newline>' is just fine here.

It is not enough to make sure that IFS has SP so that existing code
works correctly; we also need to see if the existing code needs to
avoid cutting the tokens at HT or LF.  I think in this case using
the default IFS is safe, as input to pre-push are SP separated refs
and object names, none of which can have SP, HT or LF in it.

>># Check for missing good GPG signatures
>>git log --format="%G? %h" "$range" |
>>(
>>                exitcode=0
>>                while read sign commit
>>                do
>>                                test "$sign" = G && continue
>>                                echo "Commit $commit does not have a good GPG signature"
>>                                exitcode=1
>>                done
>>                exit $exitcode
>>)
>>let exitcode=exitcode\|$?

Don't use bash-ism "let".

The above loop is a perfectly fine and readable way to write the
logic, by the way

Except that we tend to prefer $ret over $exitcode, but I've already
said that.

Thanks.

  reply	other threads:[~2013-04-25 16:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAASwCXf3YHmdQ_eSkShyzn5VniO=ufm3VTqV1JVOUN610bzE_A@mail.gmail.com>
2013-04-22 23:43 ` [PATCH] Add .gitconfig variable commit.gpg-sign Junio C Hamano
2013-04-23  0:00   ` Joel Jacobson
2013-04-23 11:37     ` Michael J Gruber
2013-04-23 17:53       ` Junio C Hamano
2013-04-23 17:58         ` Joel Jacobson
2013-04-23 19:25           ` Junio C Hamano
2013-04-23 19:56             ` Joel Jacobson
2013-04-24  8:53               ` Sebastian Götte
2013-04-24  9:51                 ` Michael J Gruber
2013-04-24 17:30                   ` [PATCH 1/1] templates: pre-push hook: check for missing GPG signatures (was: Re: [PATCH] Add .gitconfig variable commit.gpg-sign) Sebastian Götte
2013-04-24 19:54                     ` [PATCH 1/1] templates: pre-push hook: check for missing GPG signatures Junio C Hamano
2013-04-25 12:19                       ` [PATCH v2 0/1] " Sebastian Götte
2013-04-25 16:50                         ` Junio C Hamano [this message]
     [not found]                       ` <cover.1366890748.git.jaseg@physik-pool.tu-berlin.de>
2013-04-25 12:19                         ` [PATCH v2 1/1] " Sebastian Götte
2013-04-23 14:01   ` [PATCH] Add .gitconfig variable commit.gpg-sign 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=7vy5c64krz.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jaseg@physik.tu-berlin.de \
    --cc=joel@trustly.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).