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

Re: [RFC PATCH] show decorations at the end of the line

From
Jeff King <peff@peff.net>
Date
Feb 20, 2017, 00:46 UTC
Message-ID
<20170220004648.c2zz6bm2hylvep6x@sigill.intra.peff.net>
In-Reply-To
<CA+P7+xqtPwzt3J6O05TP=E_hh-ko97adn+__Zmc0DNSDqEnEHw@mail.gmail.com>
On Sun, Feb 19, 2017 at 03:03:21PM -0800, Jacob Keller wrote:
Show 21 quoted lines
> >> I just got bitten by a fallout.  I have
> >>
> >>     $ git recent --help
> >>     `git recent' is aliased to `log --oneline --branches --no-merges \
> >>          --source --since=3.weeks'
> >>
> >> but now the branch names are shown at the end, which defeats the
> >> whole point of the alias.
> >
> > Yes, your situation actually wants those decorations as primary
> > things, so having them at the end is indeed pointless.
> >
> > So I think we should just discard that patch of mine.
> >
> >                  Linus
> 
> I would think that in general putting them at the end makes more
> sense, but we should have the ability to use them in format specifiers
> so that users are free to customize it exactly how they want. That is,
> I agree with the reasoning presented in the original patch, but think
> Junio's case can be solved by strengthening the custom formats.
I think there are two potential patches:
  1. Add a custom-format placeholder for the --source value.
     This is an obvious improvement that doesn't hurt anyone.
  2. Switch --decorate to the end by default, but _not_ --source.
     This use case _could_ be served already by using a custom format
     with "%d". So it's really just a matter of having better-looking
     default.
     It might hurt somebody's script, but for the reasons discussed
     earlier in the thread, people are unlikely to be parsing it (it's
     more likely somebody would just complain because they think the
     decoration-first behavior is prettier).
-Peff
Previous: Jacob KellerNext: Junio C Hamano
Message 12 of 20 in “show decorations at the end of the line”
  1. show decorations at the end of the lineLinus Torvalds, Feb 11, 2017
  2. Linus TorvaldsFeb 11, 2017
  3. Junio C HamanoFeb 13, 2017
  4. Linus TorvaldsFeb 13, 2017
  5. Junio C HamanoFeb 13, 2017
  6. Jeff KingFeb 13, 2017
  7. Junio C HamanoFeb 14, 2017
  8. Jeff KingFeb 15, 2017
  9. Junio C HamanoFeb 18, 2017
  10. Linus TorvaldsFeb 19, 2017
  11. Jacob KellerFeb 19, 2017
  12. Jeff KingFeb 20, 2017
  13. Junio C HamanoFeb 20, 2017
  14. Linus TorvaldsFeb 20, 2017
  15. Junio C HamanoFeb 21, 2017
  16. Linus TorvaldsFeb 21, 2017
  17. Jeff KingFeb 21, 2017
  18. Junio C HamanoFeb 21, 2017
  19. Jeff KingFeb 21, 2017
  20. Stephan BeyerFeb 14, 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.