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

Re: [Bug] git log --show-signature print extra carriage return ^M

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 5, 2018, 14:29 UTC
Message-ID
<nycvar.QRO.7.76.6.1803051457570.20700@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<CAL+2DvQZ2V9c5Tmn8KCoDOuioOiBsGJspSTVin4qw1oFO2QAwA@mail.gmail.com>
Hi Larry,
On Sun, 4 Mar 2018, Larry Hunter wrote:
Show 5 quoted lines
> There is bug using "git log --show-signature" in my installation
> 
>     git 2.16.2.windows.1
>     gpg (GnuPG) 2.2.4
>     libgcrypt 1.8.2
The gpg.exe shipped in Git for Windows should say something like this:
	$ gpg --version
	gpg (GnuPG) 1.4.22
	Copyright (C) 2015 Free Software Foundation, Inc.
	License GPLv3+: GNU GPL version 3 or later
	<http://gnu.org/licenses/gpl.html>
	This is free software: you are free to change and redistribute it.
	There is NO WARRANTY, to the extent permitted by law.
	Home: ~/.gnupg
	Supported algorithms:
	Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
	Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
		CAMELLIA128, CAMELLIA192, CAMELLIA256
	Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
	Compression: Uncompressed, ZIP, ZLIB, BZIP2

Therefore, the GNU Privacy Guard version you use is not the one shipped and supported by the Git for Windows project.

Show 20 quoted lines
> that prints (with colors) an extra ^M (carriage return?) at the end of
> the gpg lines. As an example, the output of "git log --show-signature
> HEAD" looks like:
> 
>     $ git log --show-signature HEAD
>     commit 46c490188ebd216f20c454ee61108e51b481844e (HEAD -> master)
>     gpg: Signature made 03/04/18 16:53:06 ora solare Europa occidentale^M
>     gpg:                using RSA key ...^M
>     gpg: Good signature from "..." [ultimate]^M
>     Author: ... <...>
>     Date:   Sun Mar 4 16:53:06 2018 +0100
>     ...
> 
> To help find a fix, I tested the command "git verify-commit HEAD" that
> prints (without colors) the same lines without extra ^M characters.
> 
>     $ git verify-commit HEAD
>     gpg: Signature made 03/04/18 16:53:06 ora solare Europa occidentale
>     gpg:                using RSA key ...
>     gpg: Good signature from "..." [ultimate]

My guess is that the latter command simply does not go through the pager while the former does.

Do you see the ^M in the output of `git -p verify-commit HEAD`?

Ciao, Johannes

Previous: Larry HunterNext: Larry Hunter
Message 2 of 4 in “[Bug] git log --show-signature print extra carriage return ^M”
  1. Larry HunterMar 4, 2018
  2. Johannes SchindelinMar 5, 2018
  3. Larry HunterMar 6, 2018
  4. Johannes SchindelinApr 28, 2018

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.