Re: [PATCH 2/6] Documentation/config: mention "now" and "never" for 'expire' settings
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jul 28, 2015, 20:33 UTC
- Message-ID
- <CAPig+cQPj3wA8EfdNTskCUc__QXLwR07Ck4QrYvc9wnZqOxtug@mail.gmail.com>
- In-Reply-To
- <55B58C3B.7040200@alum.mit.edu>
On Sun, Jul 26, 2015 at 9:41 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 25 quoted lines
> On 07/23/2015 09:00 PM, Eric Sunshine wrote:
>> In addition to approxidate-style values ("2.months.ago", "yesterday"),
>> consumers of 'gc.*expire*' configuration variables also accept and
>> respect 'now'/'all' ("do it immediately") and 'never'/'false' ("suppress
>> entirely").
>>
>> Suggested-by: Michael Haggerty <mhagger@alum.mit.edu>
>> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
>> ---
>> gc.pruneExpire::
>> When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'.
>> Override the grace period with this config variable. The value
>> - "now" may be used to disable this grace period and always prune
>> - unreachable objects immediately.
>> + "now" may be used to disable this grace period and always prune
>> + unreachable objects immediately; or "never" to suppress pruning.
>
> A semicolon should be used without a conjunction, and the parts of a
> sentence joined by a semicolon should be independent clauses. So this
> should probably be
>
> [...] The value
> "now" may be used to disable this grace period and always prune
> unreachable objects immediately, or "never" may be used to
> suppress pruning.I was absent from school that day...
Show 13 quoted lines
>> @@ -1328,7 +1330,8 @@ gc.reflogExpireUnreachable:: >> gc.<ref>.reflogExpireUnreachable:: >> 'git reflog expire' removes reflog entries older than >> this time and are not reachable from the current tip; >> - defaults to 30 days. With "<pattern>" (e.g. "refs/stash") >> + defaults to 30 days. The value "all" expires all entries; and >> + "false" disables expiration. With "<pattern>" (e.g. "refs/stash") >> in the middle, the setting applies only to the refs that >> match the <pattern>. > > Also, I wonder why you suggest "now"/"never" for the first two settings, > but "all"/"false" for the second two. Wouldn't it be less confusing to > be consistent?
It was intentional due to the way I worded the sentence. It sounded slightly strange to my ear to say:
The value "now" expires all entries; and "never"
disables expiration.whereas:
The value "all" expires all entries; ...
sounded nice. But, upon reflection, with a slight re-wording[1], "all" and "never" work, as well.
[1]: http://article.gmane.org/gmane.comp.version-control.git/274828