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

Re: [RFC/PATCH] shortstatus v1

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Feb 10, 2009, 03:46 UTC
Message-ID
<slrngp1u4h.i22.sitaramc@sitaramc.homelinux.net>
In-Reply-To
<7vr627qd4p.fsf@gitster.siamese.dyndns.org>
On 2009-02-10, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Tuncer Ayaz <tuncer.ayaz@gmail.com> writes:
>
>> Adding git 'shortstatus --mini' to PS1 is not noticeable or 1sec
>> maximum in my tree. As a worst case it takes 10secs in a clone
>> of WebKit.git.
>
> Frankly, I think having to spend one second to add only one or two bits to
> PS1 is simply spending one second too much.
[snip]
> Do you really need more than "diff-index --cached --exit-code" in your
> $PS1 code, and so why?  Does the added feature your "shortstatus --mini"
> offers over "diff-index --cached --exit-code" justify the latency penalty
> to the user?

I wonder if I could ask people opinions on a trick I pulled, which is basically maintain a state of the value of $SECONDS each time the user is shown a bash prompt. If the value is the same as last time (meaning he hit enter twice in a row very quickly), it runs the extra stuff.

It sounds like a dirty trick, but seems to work fine and give you the best of both worlds.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 25 in “shortstatus v1”
  1. shortstatus v1Tuncer Ayaz, Feb 10, 2009
  2. Junio C HamanoFeb 10, 2009
  3. Sitaram ChamartyFeb 10, 2009
  4. Spending time in PS1, was Re: [RFC/PATCH] shortstatus v1Johannes Schindelin, Feb 10, 2009
  5. Sitaram ChamartyFeb 10, 2009
  6. Tuncer AyazFeb 10, 2009
  7. Jeff KingFeb 10, 2009
  8. Michael J GruberFeb 10, 2009
  9. Tuncer AyazFeb 10, 2009
  10. Jeff KingFeb 10, 2009
  11. Michael J GruberFeb 10, 2009
  12. Jeff KingFeb 10, 2009
  13. Junio C HamanoFeb 10, 2009
  14. Jeff KingFeb 10, 2009
  15. Jeff KingFeb 10, 2009
  16. Jeff KingFeb 10, 2009
  17. Tuncer AyazFeb 10, 2009
  18. Jeff KingFeb 10, 2009
  19. Junio C HamanoFeb 10, 2009
  20. Tuncer AyazFeb 10, 2009
  21. Jeff KingFeb 10, 2009
  22. Junio C HamanoFeb 10, 2009
  23. Jeff KingFeb 12, 2009
  24. Nanako ShiraishiFeb 10, 2009
  25. Junio C HamanoFeb 11, 2009

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.