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

Re: [PATCH v2 00/12] Pulling signed/annotated tags

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 8, 2011, 05:37 UTC
Message-ID
<7vobwnyy2m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CA+55aFyEuuT25m00uakL66YKSpT-zjoiBreymFSbuHmtARq6yw@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> But I don't have any really strong opinions on it. I just think it's a
> good idea to make it easy to parse both mechanically and
> human-visually, and "number of lines" doesn't strike me as being very
> human-friendly.

Here is what I had in mind. An empty line in the tag payload would become "mergetag \n" and a separate would become "mergetag\n". The consumer of "cat-file commit" would be able to tell between the two anyway and if a human _really_ cares, s/he can pipe it to "cat -e" or something.

Honestly, I do not care too much about human readability of "mergetag" header. We could even store zlib-deflate-and-then-base85 the payload, which _might_ be a better solution. For one thing, it would protect us from potential NUL in the tag payload ;-).

 commit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/commit.c b/commit.c
index 7d471a3..6a5d40e 100644
--- a/commit.c
+++ b/commit.c
@@ -868,6 +868,8 @@ static void handle_signed_tag(struct strbuf *signed_tags, struct commit *parent)
 	 * if (verify_signed_buffer(buf, len, buf + len, size - len, &sig))
 	 *	warn("warning: signed tag unverified.");
 	 */
+	if (signed_tags->len)
+		strbuf_addstr(signed_tags, "mergetag\n");
 	strbuf_add_lines(signed_tags, "mergetag ", buf, size);
 
 free_return:
Previous: Linus TorvaldsNext: Junio C Hamano
Message 31 of 32 in “Pulling signed tag”
  1. 00/10 Pulling signed tagJunio C Hamano, Nov 5, 2011
  2. 01/10 Split GPG interface into its own helper libraryJunio C Hamano, Nov 5, 2011
  3. 02/10 fetch: do not store peeled tag object names in FETCH_HEADJunio C Hamano, Nov 5, 2011
  4. 03/10 merge: notice local merging of tags and keep it unwrappedJunio C Hamano, Nov 5, 2011
  5. 04/10 fetch: allow "git fetch $there v1.0" to fetch a tagJunio C Hamano, Nov 5, 2011
  6. 05/10 tests: distinguish merges of tags and commitsJunio C Hamano, Nov 5, 2011
  7. 06/10 refs DWIMmery: use the same rule for both "git fetch" and othersJunio C Hamano, Nov 5, 2011
  8. 07/10 fmt-merge-msg: avoid early returnsJunio C Hamano, Nov 5, 2011
  9. 08/10 fmt-merge-msg: package options into a structureJunio C Hamano, Nov 5, 2011
  10. 09/10 fmt-merge-msg: Add contents of merged tag in the merge messageJunio C Hamano, Nov 5, 2011
  11. Johannes SixtNov 5, 2011
  12. Junio C HamanoNov 6, 2011
  13. 10/10 merge: force edit mode when merging a tag objectJunio C Hamano, Nov 5, 2011
  14. Nguyen Thai Ngoc DuyNov 5, 2011
  15. 00/12 Pulling signed/annotated tagsJunio C Hamano, Nov 8, 2011
  16. 01/12 Split GPG interface into its own helper libraryJunio C Hamano, Nov 8, 2011
  17. 02/12 fetch: do not store peeled tag object names in FETCH_HEADJunio C Hamano, Nov 8, 2011
  18. 03/12 merge: notice local merging of tags and keep it unwrappedJunio C Hamano, Nov 8, 2011
  19. 04/12 fetch: allow "git fetch $there v1.0" to fetch a tagJunio C Hamano, Nov 8, 2011
  20. 05/12 refs DWIMmery: use the same rule for both "git fetch" and othersJunio C Hamano, Nov 8, 2011
  21. 06/12 fmt-merge-msg: avoid early returnsJunio C Hamano, Nov 8, 2011
  22. 07/12 fmt-merge-msg: package options into a structureJunio C Hamano, Nov 8, 2011
  23. 08/12 fmt-merge-msg: Add contents of merged tag in the merge messageJunio C Hamano, Nov 8, 2011
  24. 09/12 merge: make usage of commit->util more extensibleJunio C Hamano, Nov 8, 2011
  25. 10/12 merge: record tag objects without peeling in MERGE_HEADJunio C Hamano, Nov 8, 2011
  26. 11/12 commit: copy merged signed tags to headers of merge commitJunio C Hamano, Nov 8, 2011
  27. 12/12 merge: force edit mode when merging a tag objectJunio C Hamano, Nov 8, 2011
  28. Linus TorvaldsNov 8, 2011
  29. Junio C HamanoNov 8, 2011
  30. Linus TorvaldsNov 8, 2011
  31. Junio C HamanoNov 8, 2011
  32. Junio C HamanoNov 8, 2011

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.