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

Re: [PATCH 6/7] builtin/describe.c: describe a blob

From
Philip Oakley <philipoakley@iee.org>
Date
Nov 4, 2017, 21:15 UTC
Message-ID
<BFE987312194406AAAEA8DAC7EC5BFF5@PhilipOakley>
In-Reply-To
<xmqq375xs3zr.fsf@gitster.mtv.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Sent: Thursday, November 02, 2017 4:23 AM
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> The reason why we say "-ish" is "Yes we know v2.15.0 is *NOT* a
>> commit object, we very well know it is a tag object, but because we
>> allow it to be used in a context that calls for a commit object, we
>> mark that use context as 'this accepts commit-ish, not just
>> commit'".
>
> Having said all that, there is a valid case in which we might want
> to say "blob-ish".

Is this not also an alternative case, relative to the user, for the scenario where the user has an oid/sha1 value but does not know what it is, and would like to find its source and type relative to the `describe` command.

IIUC the existing `describe` command only accepts <commit-ish> values, and here we are extending that to be even more inclusive, but at the same time the options become more restricted. Thus the synopsis terminology would be more about suggesting the range of options available (search style/start points) that are applicable to blobs, than being exactly about the 'allow-blobs' parameter.

Or have I misunderstood how the fast commit search and the slower potentially-a-blob searching are disambiguated? -- Philip

Show 22 quoted lines
>
> To review, X-ish is the word we use when the command wants to take
> an X, but tolerates a lazy user who gives a Y, which is *NOT* X,
> without bothering to add ^{X} suffix, i.e. Y^{X}.  In such a case,
> the command takes not just X but takes X-ish because it takes a Y
> and converts it internally to an X to be extra nice.
>
> When the command wants to take a blob, but tolerates something else
> and does "^{blob}" internally, we can say it takes "blob-ish".
> Technically that "something else" could be an annotated tag that
> points at a blob object, without any intervening commit or tree (I
> did not check if the "describe <blob>" code in this thread handles
> this, though).
>
> But because it is not usually done to tag a blob directly, it would
> probably be not worth to say "blob-ish" in the document and cause
> readers to wonder in what situation something that is not a blob can
> be treated as if it were a blob.  It does feel like we would be
> pursuing technical correctness too much and sacrificing the readability
> of the document, at least to me, and a bad trade-off.
>
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 31 of 110 in “git-describe <blob> ?”
  1. 0/3 git-describe <blob> ?Stefan Beller, Oct 28, 2017
  2. 1/3 list-objects.c: factor out traverse_trees_and_blobsStefan Beller, Oct 28, 2017
  3. 2/3 revision.h: introduce blob/tree walking in order of the commitsStefan Beller, Oct 28, 2017
  4. Johannes SchindelinOct 28, 2017
  5. Stefan BellerOct 29, 2017
  6. Stefan BellerOct 29, 2017
  7. Junio C HamanoOct 29, 2017
  8. 3/3 builtin/describe: describe blobsStefan Beller, Oct 28, 2017
  9. Johannes SchindelinOct 28, 2017
  10. Jacob KellerOct 28, 2017
  11. Stefan BellerOct 29, 2017
  12. Kevin DaudtOct 29, 2017
  13. Johannes SchindelinOct 29, 2017
  14. Johannes SchindelinOct 28, 2017
  15. Stefan BellerOct 29, 2017
  16. Johannes SchindelinOct 28, 2017
  17. 0/7 git-describe <blob>Stefan Beller, Oct 31, 2017
  18. 1/7 list-objects.c: factor out traverse_trees_and_blobsStefan Beller, Oct 31, 2017
  19. Junio C HamanoOct 31, 2017
  20. 5/7 builtin/describe.c: factor out describe_commitStefan Beller, Oct 31, 2017
  21. 4/7 builtin/describe.c: print debug statements earlierStefan Beller, Oct 31, 2017
  22. Junio C HamanoOct 31, 2017
  23. Stefan BellerOct 31, 2017
  24. 6/7 builtin/describe.c: describe a blobStefan Beller, Oct 31, 2017
  25. Junio C HamanoOct 31, 2017
  26. Stefan BellerOct 31, 2017
  27. Junio C HamanoNov 1, 2017
  28. Stefan BellerNov 1, 2017
  29. Junio C HamanoNov 2, 2017
  30. Junio C HamanoNov 2, 2017
  31. Philip OakleyNov 4, 2017
  32. Junio C HamanoNov 5, 2017
  33. Philip OakleyNov 6, 2017
  34. Stefan BellerNov 9, 2017
  35. Philip OakleyNov 10, 2017
  36. Junio C HamanoNov 10, 2017
  37. 0/1 describe a blob: with better docsStefan Beller, Nov 10, 2017
  38. builtin/describe.c: describe a blobStefan Beller, Nov 10, 2017
  39. Junio C HamanoNov 13, 2017
  40. Stefan BellerNov 14, 2017
  41. Philip OakleyNov 20, 2017
  42. Philip OakleyNov 20, 2017
  43. Junio C HamanoNov 1, 2017
  44. 7/7 t6120: fix typo in test nameStefan Beller, Oct 31, 2017
  45. Junio C HamanoNov 1, 2017
  46. Stefan BellerNov 1, 2017
  47. Junio C HamanoNov 2, 2017
  48. 3/7 builtin/describe.c: rename `oid` to avoid variable shadowingStefan Beller, Oct 31, 2017
  49. Jacob KellerOct 31, 2017
  50. 2/7 revision.h: introduce blob/tree walking in order of the commitsStefan Beller, Oct 31, 2017
  51. Junio C HamanoOct 31, 2017
  52. Stefan BellerOct 31, 2017
  53. 0/7 git describe blobStefan Beller, Oct 31, 2017
  54. 1/7 list-objects.c: factor out traverse_trees_and_blobsStefan Beller, Oct 31, 2017
  55. Junio C HamanoNov 1, 2017
  56. 4/7 builtin/describe.c: print debug statements earlierStefan Beller, Oct 31, 2017
  57. Eric SunshineOct 31, 2017
  58. 7/7 t6120: fix typo in test nameStefan Beller, Oct 31, 2017
  59. 2/7 revision.h: introduce blob/tree walking in order of the commitsStefan Beller, Oct 31, 2017
  60. Junio C HamanoNov 1, 2017
  61. Johannes SchindelinNov 1, 2017
  62. Junio C HamanoNov 1, 2017
  63. Stefan BellerNov 1, 2017
  64. Johannes SchindelinNov 1, 2017
  65. Stefan BellerNov 1, 2017
  66. Johannes SchindelinNov 1, 2017
  67. Stefan BellerNov 1, 2017
  68. Johannes SchindelinNov 1, 2017
  69. Jeff KingNov 1, 2017
  70. Johannes SchindelinNov 1, 2017
  71. Junio C HamanoNov 2, 2017
  72. 6/7 builtin/describe.c: describe a blobStefan Beller, Oct 31, 2017
  73. Eric SunshineOct 31, 2017
  74. Stefan BellerNov 1, 2017
  75. Junio C HamanoNov 1, 2017
  76. Johannes SchindelinNov 1, 2017
  77. Stefan BellerNov 1, 2017
  78. Jacob KellerNov 1, 2017
  79. Johannes SchindelinNov 1, 2017
  80. Stefan BellerNov 1, 2017
  81. Johannes SchindelinNov 1, 2017
  82. Stefan BellerNov 1, 2017
  83. Jacob KellerNov 2, 2017
  84. Junio C HamanoNov 3, 2017
  85. Jacob KellerNov 3, 2017
  86. Junio C HamanoNov 3, 2017
  87. Andreas SchwabNov 2, 2017
  88. Stefan BellerNov 2, 2017
  89. Johannes SchindelinNov 3, 2017
  90. Stefan BellerNov 1, 2017
  91. 3/7 builtin/describe.c: rename `oid` to avoid variable shadowingStefan Beller, Oct 31, 2017
  92. 5/7 builtin/describe.c: factor out describe_commitStefan Beller, Oct 31, 2017
  93. Junio C HamanoNov 1, 2017
  94. 0/7 git describe blobStefan Beller, Nov 2, 2017
  95. 1/7 t6120: fix typo in test nameStefan Beller, Nov 2, 2017
  96. 2/7 list-objects.c: factor out traverse_trees_and_blobsStefan Beller, Nov 2, 2017
  97. 3/7 revision.h: introduce blob/tree walking in order of the commitsStefan Beller, Nov 2, 2017
  98. Jonathan TanNov 14, 2017
  99. 6/7 builtin/describe.c: factor out describe_commitStefan Beller, Nov 2, 2017
  100. 5/7 builtin/describe.c: print debug statements earlierStefan Beller, Nov 2, 2017
  101. Jonathan TanNov 14, 2017
  102. Stefan BellerNov 14, 2017
  103. 7/7 builtin/describe.c: describe a blobStefan Beller, Nov 2, 2017
  104. Jonathan TanNov 14, 2017
  105. Stefan BellerNov 14, 2017
  106. Jonathan TanNov 14, 2017
  107. 4/7 builtin/describe.c: rename `oid` to avoid variable shadowingStefan Beller, Nov 2, 2017
  108. Jacob KellerNov 3, 2017
  109. Junio C HamanoNov 3, 2017
  110. Stefan BellerNov 3, 2017

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.