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

Re: [git patches] libata updates, GPG signed (but see admin notes)

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 1, 2011, 19:47 UTC
Message-ID
<7vwrbjlj5r.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CA+55aFwL_s=DcT46dprcYVWEAm_=WkuTV6K9dAn3wc_bDQU8vA@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 12 quoted lines
> But what would be nice is that "git pull" would fetch the tag (based on
> name) *automatically*, and not actually create a tag in my repository at
> all. Instead, if would use the tag to check the signature, and - if we
> do this right - also use the tag contents to populate the merge commit
> message.
>
> In other words, no actual tag would ever be left around as a turd, it
> would simply be used as an automatic communication channel between the
> "git push -s" of the submitter and my subsequent "git pull". Neither
> side would have to do anything special, and the tag would never show
> up in any relevant tree (it could even be in a totally separate
> namespace like "refs/pullmarker/<branchname>" or something).

While I like the "an ephemeral tag is used only for hop-to-hop communication to carry information to be recorded in the resulting history" approach, I see a few downsides.

 * The ephemeral tag needs to stay somewhere under refs/ hierarchy of the
   lieutenant's tree until you pick it up, even if they are out of the way
   in refs/pullmarker/$branchname. The next time the same lieutenant makes
   a pull request, either it will be overwritten or multiple versions of
   them refs/pullmarker/$branchname/$serial need to be kept.
   - If the former, this makes forking of the project harder. Suppose a
     pull request is made, you fetch and reject it. The lieutenant reworks
     and makes another pull request. At this point the earlier signature
     is gone. If somebody disagreed with your rejection and wanted to run
     his tree with the initial version you rejected, his tree will not
     carry the signature from the lieutenant.
   - If the latter, then there needs to be a way to expire these pull
     markers when they no longer are useful (i.e. the signature in it is
     transcribed to a merge commit you create) [*1*]. But the party who
     has power to clean them (i.e. the lieutenant who owns the repository)
     is different from the party whose action determines when they no
     longer are necessary (i.e. you). In practice this would lead to these
     pull markers not cleaned at all [*2*].
 * To verify the commit C that was taken from the tip of lieutenant's tree
   some time ago, one has to find the merge commit that has C as a parent,
   and look at the merge commit.  For example "git log --show-signature"
   would either show or not show the authenticity of C depending on where
   the traversal comes from. You certainly can implement it that way, but
   "some child describes an aspect of its parent, but not necessarily all
   children do so" feels philosophically less correct than "the commit has
   data to describe itself".

In your "ephemeral tag", the workflow for a developer (D) and his integrator (U) would look like this, I think.

 D$ until have something worth sending; do work; done
 D$ git push -s
 Enter passphrase: ...
	- "push" internally creates a pull marker that signs the commit
          object name this is pushing, among other things, and sends it
          along the primary payload
 D$ git pull-request; mail linus
 U$ git pull
 	- "pull" notices the pull marker and fetches it as well;
        - "pull" GPG validates the pull marker;
        - When preparing a merge commit message, the contents of the
          pull marker is included in .git/MERGE_MSG

The "in-commit signature" would give you 100% and your contributors 98% of that, I think.

 D$ until have something worth sending; do work; done
        - The final round of reworking is concluded with "commit -S",
          which would GPG sign the tip commit itself
 D$ git push
	- Nothing needs to change in the protocol nor "push" itself
 D$ git pull-request; mail linus
 U$ git pull
 	- "pull" GPG validates the tip commit
	- Nothing unusual needs to happen to the resulting "merge" commit
And as a bonus, the code is already there ;-).
[Footnote]

*1* The common ancestor discovery in fetch uses as many refs as it can to reduce the amount of data that needs to be transferred, and it is known to hurt performance of the initial advertisement exchange when there are too many useless refs.

*2* Do casual git users even know how to remove refs in a remote/publishing repository?

Previous: Jiri KosinaNext: Linus Torvalds
Message 28 of 81 in “Re: [git patches] libata updates, GPG signed (but see admin notes)”
  1. Ingo MolnarOct 31, 2011
  2. Junio C HamanoOct 31, 2011
  3. Ingo MolnarOct 31, 2011
  4. Junio C HamanoOct 31, 2011
  5. Ted Ts'oOct 31, 2011
  6. Junio C HamanoOct 31, 2011
  7. Linus TorvaldsOct 31, 2011
  8. H. Peter AnvinOct 31, 2011
  9. Linus TorvaldsOct 31, 2011
  10. H. Peter AnvinOct 31, 2011
  11. Linus TorvaldsOct 31, 2011
  12. Junio C HamanoOct 31, 2011
  13. Linus TorvaldsOct 31, 2011
  14. Ingo MolnarNov 2, 2011
  15. Jochen StriepeNov 2, 2011
  16. Junio C HamanoOct 31, 2011
  17. Junio C HamanoOct 31, 2011
  18. H. Peter AnvinOct 31, 2011
  19. Ted Ts'oOct 31, 2011
  20. H. Peter AnvinOct 31, 2011
  21. Linus TorvaldsOct 31, 2011
  22. H. Peter AnvinOct 31, 2011
  23. Linus TorvaldsOct 31, 2011
  24. James BottomleyNov 1, 2011
  25. Jeff GarzikOct 31, 2011
  26. H. Peter AnvinNov 1, 2011
  27. Jiri KosinaOct 31, 2011
  28. Junio C HamanoNov 1, 2011
  29. Linus TorvaldsNov 1, 2011
  30. Junio C HamanoNov 1, 2011
  31. Linus TorvaldsNov 2, 2011
  32. Junio C HamanoNov 2, 2011
  33. Shawn PearceNov 3, 2011
  34. Linus TorvaldsNov 3, 2011
  35. Linus TorvaldsNov 3, 2011
  36. Shawn PearceNov 3, 2011
  37. Linus TorvaldsNov 3, 2011
  38. Jochen StriepeNov 3, 2011
  39. Linus TorvaldsNov 3, 2011
  40. David WoodhouseNov 10, 2011
  41. Marc BranchaudNov 10, 2011
  42. Linus TorvaldsNov 3, 2011
  43. Linus TorvaldsNov 3, 2011
  44. Junio C HamanoNov 4, 2011
  45. Junio C HamanoNov 4, 2011
  46. Linus TorvaldsNov 4, 2011
  47. Jeff KingNov 5, 2011
  48. Junio C HamanoNov 5, 2011
  49. Junio C HamanoNov 3, 2011
  50. Junio C HamanoNov 3, 2011
  51. Linus TorvaldsNov 3, 2011
  52. Ted Ts'oNov 4, 2011
  53. Linus TorvaldsNov 4, 2011
  54. valdis.kletnieks@vt.eduNov 7, 2011
  55. Linus TorvaldsNov 7, 2011
  56. Junio C HamanoNov 5, 2011
  57. Linus TorvaldsNov 5, 2011
  58. Junio C HamanoNov 5, 2011
  59. Linus TorvaldsNov 6, 2011
  60. Junio C HamanoNov 9, 2011
  61. Johan HerlandNov 10, 2011
  62. Junio C HamanoNov 10, 2011
  63. Johan HerlandNov 10, 2011
  64. Junio C HamanoNov 10, 2011
  65. Johan HerlandNov 11, 2011
  66. Junio C HamanoNov 11, 2011
  67. Junio C HamanoNov 10, 2011
  68. Linus TorvaldsNov 3, 2011
  69. Junio C HamanoNov 4, 2011
  70. Linus TorvaldsNov 4, 2011
  71. Jeff KingNov 3, 2011
  72. Robin H. JohnsonNov 3, 2011
  73. Junio C HamanoNov 3, 2011
  74. Ted Ts'oNov 1, 2011
  75. Junio C HamanoNov 2, 2011
  76. david@lang.hmNov 2, 2011
  77. Linus TorvaldsNov 2, 2011
  78. David WoodhouseNov 10, 2011
  79. Michael J GruberNov 2, 2011
  80. Junio C HamanoNov 2, 2011
  81. Michael J GruberNov 2, 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.