Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 2 Apr 2020 15:00:21 -0700 | Subject | Re: [GIT PULL] x86 fix |
| |
On Thu, Apr 2, 2020 at 2:51 AM Ingo Molnar <mingo@kernel.org> wrote: > > The only slightly annoying part for the scripting was to extract the > contents of the signed tag into the draft email, which I did with this > rather inelegant hack: > > git tag -l --format='%(contents)' $TAG | gawk '/-----BEGIN PGP SIGNATURE-----/{exit;}//{print $0;}' | head -n -1 > > ... but I couldn't find a better way.
Yeah, you're supposed to use the existing code, but I guess your approach works too.
I think git request-pull just uses "git cat-file" instead to show the tag contents, but yes, I guess you can use "git tag -l --format" too.
[ Goes and looks up ]
This is what git-request-pull does:
git cat-file tag "$head" | sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p
but admittedly "get cat-file" is a really low-level plumbing thing. It's basically how you get the raw data out of any git object.
Linus
| |