git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GUILT] [PATCH] Fix fatal "guilt graph" error in sha1sum invocation.

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Mar 14, 2012, 14:27 UTC
Message-ID
<m2k42nmf5g.fsf@igel.home>
In-Reply-To
<87399bpaq9.fsf@opera.com>
Per Cederqvist <cederp@opera.com> writes:
Show 6 quoted lines
> -	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

Show 10 quoted lines
>  # usage: sha1 [file]
>  sha1()
>  {
> -	sha1sum "$1"
> +	if [ $# = 1 ]
> +	then
> +		sha1sum "$1"
> +	else
> +		sha1sum
> +	fi
        sha1sum "$@"
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Jeff SipekNext: Per Cederqvist
Message 3 of 6 in “Fix fatal "guilt graph" error in sha1sum invocation.”
  1. Per CederqvistMar 14, 2012
  2. Jeff SipekMar 14, 2012
  3. Andreas SchwabMar 14, 2012
  4. Per CederqvistMar 15, 2012
  5. Andreas SchwabMar 15, 2012
  6. John SzakmeisterMar 15, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.