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

Re: is it "git gc --prune=now" or "git gc --prune=all"?

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Mar 9, 2019, 18:13 UTC
Message-ID
<alpine.LFD.2.21.1903091309130.16641@localhost.localdomain>
In-Reply-To
<xmqqef7ksw2w.fsf@gitster-ct.c.googlers.com>
On Wed, 6 Mar 2019, Junio C Hamano wrote:
Show 9 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > ... I do think the documentation should recommend "now". Possibly
> > builtin/gc.c should be smarter about recognizing "all" in the
> > conditional you quoted, too, though I don't know that it's all
> > that important (especially if we tweak the documentation).
>
> Yup, as the placeholder for the value is labeled as "<date>", "now"
> would be the one we should be encouraging.
  i can submit an obviously trivial patch for that -- i can see in
date.c the equally valid alternatives:
    int parse_expiry_date(const char *date, timestamp_t *timestamp)
    {
        int errors = 0;
        if (!strcmp(date, "never") || !strcmp(date, "false"))
                *timestamp = 0;
        else if (!strcmp(date, "all") || !strcmp(date, "now"))
        ... snip ...
  is the preference to simply list both alternatives, or to
*encourage* the more intuitive "now" and "never" values while politely
deprecating the others? the impression i get is the latter.
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “is it "git gc --prune=now" or "git gc --prune=all"?”
  1. Robert P. J. DayMar 2, 2019
  2. Jeff KingMar 5, 2019
  3. Junio C HamanoMar 6, 2019
  4. Robert P. J. DayMar 9, 2019
  5. Junio C HamanoMar 11, 2019

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.