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

[PATCH 1/2] Document gc.<pattern>.reflogexpire variables

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2010, 20:34 UTC
Message-ID
<7vljcppycc.fsf@alter.siamese.dyndns.org>

3cb22b8 (Per-ref reflog expiry configuration, 2008-06-15) added support for setting the expiry parameters differently for different reflog, but it was never documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This comes on top of b4ca1db (reflog --expire-unreachable: avoid
   merge-base computation, 2010-04-07).
 Documentation/config.txt |   10 ++++++++--
 Documentation/git-gc.txt |   10 ++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index a1e36d7..4e7dab6 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -885,13 +885,19 @@ gc.pruneexpire::
 	unreachable objects immediately.
 
 gc.reflogexpire::
+gc.<pattern>.reflogexpire::
 	'git-reflog expire' removes reflog entries older than
-	this time; defaults to 90 days.
+	this time; defaults to 90 days.  With "<pattern>" (e.g.
+	"refs/stash") in the middle the setting applies only to
+	the refs that match the <pattern>.
 
 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.
+	defaults to 30 days.  With "<pattern>" (e.g. "refs/stash")
+	in the middle, the setting applies only to the refs that
+	match the <pattern>.
 
 gc.rerereresolved::
 	Records of conflicted merge you resolved earlier are
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 4cd9cdf..85d7111 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -88,6 +88,16 @@ commits prior to the amend or rebase occurring.  Since these changes
 are not part of the current project most users will want to expire
 them sooner.  This option defaults to '30 days'.
 
+The above two configuration variables can be given to a pattern.  For
+example, this sets non-default expiry values only to remote tracking
+branches:
+
+------------
+[gc "refs/remotes/*"]
+	reflogExpire = never
+	reflogexpireUnreachable = 3 days
+------------
+
 The optional configuration variable 'gc.rerereresolved' indicates
 how long records of conflicted merge you resolved earlier are
 kept.  This defaults to 60 days.
-- 
1.7.1.rc1.252.gce30c
Next: Junio C Hamano
Message 1 of 16 in “Document gc.<pattern>.reflogexpire variables”
  1. 1/2 Document gc.<pattern>.reflogexpire variablesJunio C Hamano, Apr 14, 2010
  2. 2/2 reflog: ignore expire-unreachable for "HEAD" reflogJunio C Hamano, Apr 14, 2010
  3. Johannes SixtApr 15, 2010
  4. Junio C HamanoApr 15, 2010
  5. Johannes SixtApr 15, 2010
  6. Junio C HamanoApr 15, 2010
  7. Johannes SixtApr 15, 2010
  8. Jeff KingApr 15, 2010
  9. Junio C HamanoApr 15, 2010
  10. Nicolas PitreApr 15, 2010
  11. Junio C HamanoApr 15, 2010
  12. Nicolas PitreApr 16, 2010
  13. Junio C HamanoApr 16, 2010
  14. Nicolas PitreApr 16, 2010
  15. Johannes SixtApr 16, 2010
  16. Junio C HamanoApr 15, 2010

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.