]> git.ipfire.org Git - thirdparty/git.git/commit - read-cache.c
read-cache: unlink old sharedindex files
authorChristian Couder <christian.couder@gmail.com>
Mon, 6 Mar 2017 09:41:58 +0000 (10:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Mar 2017 20:09:28 +0000 (12:09 -0800)
commitb968372279d5c50df17f26afd9a9905285a73f37
treeca6a417b4b5625bb7b2c05c23f8fd58583fd28fe
parent77d67977cac46aa6c07c66ce9e2470f00feb9d20
read-cache: unlink old sharedindex files

Everytime split index is turned on, it creates a "sharedindex.XXXX"
file in the git directory. This change makes sure that shared index
files that haven't been used for a long time are removed when a new
shared index file is created.

The new "splitIndex.sharedIndexExpire" config variable is created
to tell the delay after which an unused shared index file can be
deleted. It defaults to "2.weeks.ago".

A previous commit made sure that each time a split index file is
created the mtime of the shared index file it references is updated.
This makes sure that recently used shared index file will not be
deleted.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c