From: Per Cederqvist <cederp@opera.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Jeff Sipek <jeffpc@josefsipek.net>,
git@vger.kernel.org, ceder@lysator.liu.se
Subject: Re: [GUILT] [PATCH] Fix fatal "guilt graph" error in sha1sum invocation.
Date: Thu, 15 Mar 2012 09:42:11 +0100 [thread overview]
Message-ID: <4F61AB63.5040304@opera.com> (raw)
In-Reply-To: <m2k42nmf5g.fsf@igel.home>
On 03/14/2012 03:27 PM, Andreas Schwab wrote:
> Per Cederqvist<cederp@opera.com> writes:
>
>> - openssl dgst -sha1 "$1" | sed "s,SHA1.\(.*\).= \(.*\),\2 \1,"
>> + if [ $# = 1 ]
>> + then
>> + openssl dgst -sha1 "$1" | sed "s,SHA1.\(.*\).= \(.*\),\2 \1,"
>> + else
>> + openssl dgst -sha1 | sed 's,$, -,'
>
> $ openssl dgst -sha1</dev/null
> (stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709
Was that on a Darwin? If so, my fix obviously needs some
work on that platform. I tested openssl-0.9.8o on Ubuntu
11.04, and here it looks like this:
$ openssl dgst -sha1</dev/null
da39a3ee5e6b4b0d3255bfef95601890afd80709
$ openssl version
OpenSSL 0.9.8o 01 Jun 2010
/ceder
>> # usage: sha1 [file]
>> sha1()
>> {
>> - sha1sum "$1"
>> + if [ $# = 1 ]
>> + then
>> + sha1sum "$1"
>> + else
>> + sha1sum
>> + fi
>
> sha1sum "$@"
>
> Andreas.
>
next prev parent reply other threads:[~2012-03-15 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 13:34 [GUILT] [PATCH] Fix fatal "guilt graph" error in sha1sum invocation Per Cederqvist
2012-03-14 14:21 ` Jeff Sipek
2012-03-14 14:27 ` Andreas Schwab
2012-03-15 8:42 ` Per Cederqvist [this message]
2012-03-15 9:49 ` Andreas Schwab
2012-03-15 9:56 ` John Szakmeister
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=4F61AB63.5040304@opera.com \
--to=cederp@opera.com \
--cc=ceder@lysator.liu.se \
--cc=git@vger.kernel.org \
--cc=jeffpc@josefsipek.net \
--cc=schwab@linux-m68k.org \
/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.