Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Fix space-prefixed commit header line handling in decoding #976

Closed
wants to merge 1 commit into from

Conversation

sttts
Copy link

@sttts sttts commented Oct 4, 2018

GPG signatures (and maybe other commit header extensions) use space-prefixes lines for multi-line values. Compare e.g. (with $ as the line end):

> git show --format=raw 7b8bb6e7d3345b04678d96a721f651a4a68eb1dd | sed 's/$/$/'
commit 7b8bb6e7d3345b04678d96a721f651a4a68eb1dd$
tree 45c1bcc6a707d9060419cc169484f511cd3baf20$
parent d723028d09d2fd3faa177782de8e444ac64f5875$
parent f952b093a7faa62323617a684e7f6a58d863f42f$
author Kubernetes Submit Queue <k8s-merge-robot@users.noreply.github.com> 1526444292 -0700$
committer GitHub <noreply@github.com> 1526444292 -0700$
gpgsig -----BEGIN PGP SIGNATURE-----$
 $
 wsBcBAABCAAQBQJa+7EECRBK7hj4Ov3rIwAAdHIIAACfUDQrBSxbrKOdxPVDJh31$
 S6ZvJjmEp3ha3p59YqJ740SWvdKbykb2IreMUHuIFV87N0OHlh1SonSiZKlANC7z$
 QyZcfS7O6PTMnRaLpHlLkV3rTr0gE0aNmiokFCpJJF1l0ULHv5H4OLOktNWrISdO$
 kFNrBSmqlbmndBTRQoMMaRSD9W71VqzDn9rFcPqkaz+Fu0NX7ztIwyUQQ1gcvpto$
 fowgR3TiOaUMci0lXRdv2aPchBHYHhidPTe6x5HDtciEd+LX0R2d3w2JnXaeuzKQ$
 x4M35+xt3bC3SG9dWPVyPi0nV+pMTfdHNJqLehNZQayBSSHfMeQ3TaybOyBJF8E=$
 =HoUx$
 -----END PGP SIGNATURE-----$
 $
$
    Merge pull request #63357 from Random-Liu/install-and-use-crictl$

@sttts
Copy link
Author

sttts commented Oct 4, 2018

/cc @nikhita

Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
@jfontan
Copy link
Contributor

jfontan commented Oct 8, 2018

@sttts it would be nice to have an additional test that checks this case.

Copy link
Contributor

@mcuadros mcuadros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a test? Thanks

@sttts
Copy link
Author

sttts commented Oct 22, 2018

This was fixed already in #892. Closing.

@sttts sttts closed this Oct 22, 2018
@sttts
Copy link
Author

sttts commented Oct 22, 2018

This was fixed already in #892. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants