Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:46

Possibly related (same subject, not in this thread)

Hi,

On Mon, 16 Jun 2008, Junio C Hamano wrote:
From: Junio C Hamano <redacted>
Date: Sun, 15 Jun 2008 23:48:46 -0700
Subject: [PATCH] Per-ref reflog expiry configuration

In addition to gc.reflogexpireunreachable and gc.reflogexpire, this lets
you set gc.<pattern>.reflogexpireunreachable and gc.<pattern>.reflogexpire
variables.

When "git reflog expire" expires reflog entry for $ref, the expiry timers
are taken from the first <pattern> that matches $ref (and if there isn't
the global default value is used).

For example, you could:

	[gc "refs/stash"]
		reflogexpire = never
		reflogexpireunreachable = never

	[gc "refs/remotes/*"]
		reflogexpire = 7 days
		reflogexpireunreachable = 3 days

	[gc]
		reflogexpire = 90 days
		reflogexpireunreachable = 30 days
Isn't this overkill?  I mean, we could just change git-stash to output a 
warning:

	Note: your changes have been stored temporarily.  If you need to 
	keep them permanently, consider putting them into a branch:

		git branch stashed-longer stash

Don't get me wrong: I think per-ref reflog expiry is nifty, but it may be 
_too_ nifty, i.e. so complicated only power-users will use it.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help