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

Re: How is the ^{sha256} peel syntax supposed to work?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 29, 2018, 20:53 UTC
Message-ID
<xmqq36uwc2s8.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180829191232.GC7547@aiede.svl.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
> In other words, I want the input format and output format completely
> decoupled.

I thought that the original suggestion was to use "hashname:" as a prefix to specify input format. In other words

	sha1:abababab
	sha256:abababab

And an unadorned abababab is first looked up in sha256 space for uniqueness, and if and only if there is only one object whose sha256 name begins with abababab and there is *no* object whose sha1 name begins with that hexstring (or vice versa), that string will be resolved to an object name.

I do not think ^{hashname} mixes well with ^{objecttype} syntax at all as an output specifier, either. It would make sense to be more explicit, I would think, e.g.

	git rev-parse --output=sha1 sha256:abababab
(or would that be the job for name-rev?)
Previous: Jeff KingNext: Jonathan Nieder
Message 26 of 33 in “Questions about the hash function transition”
  1. Ævar Arnfjörð BjarmasonAug 23, 2018
  2. Junio C HamanoAug 23, 2018
  3. Ævar Arnfjörð BjarmasonAug 23, 2018
  4. Junio C HamanoAug 23, 2018
  5. brian m. carlsonAug 24, 2018
  6. Jonathan NiederAug 24, 2018
  7. brian m. carlsonAug 24, 2018
  8. Jonathan NiederAug 24, 2018
  9. Jonathan NiederAug 24, 2018
  10. Johannes SchindelinAug 28, 2018
  11. Derrick StoleeAug 28, 2018
  12. Jonathan NiederAug 28, 2018
  13. Jonathan NiederAug 28, 2018
  14. Johannes SchindelinAug 29, 2018
  15. Derrick StoleeAug 29, 2018
  16. Derrick StoleeAug 29, 2018
  17. How is the ^{sha256} peel syntax supposed to work?Ævar Arnfjörð Bjarmason, Aug 29, 2018
  18. Stefan BellerAug 29, 2018
  19. Jonathan NiederAug 29, 2018
  20. Stefan BellerAug 29, 2018
  21. Ævar Arnfjörð BjarmasonAug 29, 2018
  22. Jonathan NiederAug 29, 2018
  23. Ævar Arnfjörð BjarmasonAug 29, 2018
  24. Jonathan NiederAug 29, 2018
  25. Jeff KingAug 29, 2018
  26. Junio C HamanoAug 29, 2018
  27. Jonathan NiederAug 29, 2018
  28. Jonathan NiederAug 29, 2018
  29. Jonathan NiederAug 24, 2018
  30. Ævar Arnfjörð BjarmasonAug 28, 2018
  31. Edward ThomsonAug 28, 2018
  32. Ævar Arnfjörð BjarmasonAug 28, 2018
  33. Junio C HamanoAug 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.