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

Re: [PATCH v3] for-each-ref: `:short` format for `refname`

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 3, 2008, 18:36 UTC
Message-ID
<7vtzcxaxgr.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1220431352-30605-1-git-send-email-bert.wesarg@googlemail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
Show 8 quoted lines
> Try to shorten the refname to a non-ambiguous name.
>
> Changes in v3:
>  * don't compare sha1's, its ambiguous if the short name
>    resovles to more than one ref
>  * use xstrdup()
>  * use indexes for the loops to clarify backward/forward
>    direction

Please don't do "Changes in v3" in the commit log message; do so after "---" is very welcome as it gives people on the discussion _right now_ to understand the context of the change.

Also please do not omit discussion in the commit log message, to help people _not_ on the discussion right now.

Your earlier versions will not appear on the history anywhere, and v3 is the _only_ variant available to the people who need to understand what this change was made for and why the code to implement the change was done in the way the patch shows. Write your commit log message to help people who have "git show $this" and nothing else to figure these things out in year 2010.

Namely:
 * Why "shortening" is a good thing?  For what use case this new feature
   was invented for?
 * What are the definitions of "shortening" and "non-ambiguous" in this
   feature's context?

In addition, for a complex feature with different possiblilities, it is a good practice to describe what alternatatives and pros-and-cons among them were considered while reaching this final version. This is to help people who would want to explore enhancement possibilities later; you beforehand warn them about dead ends you have already explored. For this particular patch/feature, I do not think it is necessary, though.

Previous: Bert WesargNext: Bert Wesarg
Message 18 of 26 in “for-each-ref: `:short` format for `refname`”
  1. for-each-ref: `:short` format for `refname`Bert Wesarg, Aug 31, 2008
  2. SZEDER GáborSep 1, 2008
  3. Bert WesargSep 1, 2008
  4. Bert WesargSep 1, 2008
  5. Shawn O. PearceSep 1, 2008
  6. Bert WesargSep 1, 2008
  7. Junio C HamanoSep 1, 2008
  8. Bert WesargSep 1, 2008
  9. Bert WesargSep 2, 2008
  10. Shawn O. PearceSep 2, 2008
  11. for-each-ref: `:short` format for `refname`Bert Wesarg, Sep 2, 2008
  12. Junio C HamanoSep 2, 2008
  13. Bert WesargSep 3, 2008
  14. for-each-ref: `:short` format for `refname`Bert Wesarg, Sep 3, 2008
  15. Shawn O. PearceSep 3, 2008
  16. Bert WesargSep 3, 2008
  17. Bert WesargSep 3, 2008
  18. Junio C HamanoSep 3, 2008
  19. for-each-ref: `:short` format for `refname`Bert Wesarg, Sep 5, 2008
  20. Junio C HamanoSep 5, 2008
  21. Bert WesargSep 6, 2008
  22. Junio C HamanoSep 8, 2008
  23. Shawn O. PearceSep 8, 2008
  24. Bert WesargSep 9, 2008
  25. Junio C HamanoSep 9, 2008
  26. Bert WesargSep 9, 2008

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.