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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2017, 06:25 UTC
Message-ID
<xmqqinevzvel.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171031003351.22341-7-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 10 quoted lines
> diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
> index c924c945ba..3d618b2445 100644
> --- a/Documentation/git-describe.txt
> +++ b/Documentation/git-describe.txt
> @@ -3,7 +3,7 @@ git-describe(1)
>  
>  NAME
>  ----
> -git-describe - Describe a commit using the most recent tag reachable from it
> +git-describe - Describe a commit or blob using the most recent tag reachable from it

If I am not mistaken, this series is about describing a blob as a tuple of a recent commit-ish and a path in the tree in it. Blob never reaches anything, so "desribing blob using X reachable from it" is a mere nonsense.

The original is not great in that it ignores the "--contains" mode and referring to "tagged commit" merely as "tag" for brevity, but at least it made some sense.

Show 5 quoted lines
> @@ -24,6 +24,16 @@ By default (without --all or --tags) `git describe` only shows
>  annotated tags.  For more information about creating annotated tags
>  see the -a and -s options to linkgit:git-tag[1].
>  
> +If the given `<commit-ish>` refers to a blob, it will be described

Perhaps this step should update the SYNOPSIS so that the command takes not just commit-ish but a blob too. Given the difficulty in coming up with the single-liner description of what it does we saw above, I suspect that splitting SYNOPSIS out into two very distinct operating mode might make it easier to read.

    SYNOPSIS
    --------
    [verse]
    'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]
   +'git describe' [<options>...] <blob>...

Then this additional paragraph can say "When describin a <blob>", without using a (technically nonsense) phrase "if <commit-ish> refers to a blob", which is never true.

Previous: Stefan BellerNext: Stefan Beller
Message 25 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.