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

Re: [PATCH 2/6] Documentation/config: mention "now" and "never" for 'expire' settings

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jul 27, 2015, 01:41 UTC
Message-ID
<55B58C3B.7040200@alum.mit.edu>
In-Reply-To
<1437710457-38592-3-git-send-email-sunshine@sunshineco.com>
On 07/23/2015 09:00 PM, Eric Sunshine wrote:
Show 28 quoted lines
> 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>
> ---
> 
> Reference: http://article.gmane.org/gmane.comp.version-control.git/274325
> 
> I sneaked in a minor whitespace fix.
> 
>  Documentation/config.txt | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1a8a399..cc920c0 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1307,20 +1307,22 @@ gc.packRefs::
>  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.
Show 8 quoted lines
>  gc.worktreePruneExpire::
>  	When 'git gc' is run, it calls
>  	'git worktree prune --expire 3.months.ago'.
>  	This config variable can be used to set a different grace
>  	period. The value "now" may be used to disable the grace
> -	period and prune $GIT_DIR/worktrees immediately.
> +	period and prune $GIT_DIR/worktrees immediately; or "never" to
> +	suppress pruning.
The same here.
Show 8 quoted lines
>  gc.reflogExpire::
>  gc.<pattern>.reflogExpire::
>  	'git reflog expire' removes reflog entries older than
> -	this time; defaults to 90 days.  With "<pattern>" (e.g.
> +	this time; defaults to 90 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>.
Similarly, this could be fixed to
                               [...] The value "all" expires all
    entries; "false" disables expiration. [...]
Show 9 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>.
The same here.

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?

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
Previous: Eric SunshineNext: Eric Sunshine
Message 4 of 13 in “minor documentation improvements”
  1. 0/6 minor documentation improvementsEric Sunshine, Jul 24, 2015
  2. 1/6 Documentation/git-worktree: fix broken 'linkgit' invocationEric Sunshine, Jul 24, 2015
  3. 2/6 Documentation/config: mention "now" and "never" for 'expire' settingsEric Sunshine, Jul 24, 2015
  4. Michael HaggertyJul 27, 2015
  5. Eric SunshineJul 28, 2015
  6. Junio C HamanoJul 28, 2015
  7. Eric SunshineJul 28, 2015
  8. 3/6 Documentation/git: drop outdated Cogito referenceEric Sunshine, Jul 24, 2015
  9. 4/6 Documentation/git-tools: improve discoverability of Git wikiEric Sunshine, Jul 24, 2015
  10. 5/6 Documentation/git-tools: fix item text formattingEric Sunshine, Jul 24, 2015
  11. 6/6 Documentation/git-tools: drop references to defunct toolsEric Sunshine, Jul 24, 2015
  12. Junio C HamanoJul 24, 2015
  13. Eric SunshineJul 24, 2015

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.