Re: [PATCH v3 14/21] read-cache: touch shared index files when used
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 19, 2017, 12:13 UTC
- Message-ID
- <CACsJy8B_xe6RtszPrncvDdSYosNUQxvhcEQ3DO_WO0sepXqvvQ@mail.gmail.com>
- In-Reply-To
- <xmqqvatouwsh.fsf@gitster.mtv.corp.google.com>
On Mon, Jan 9, 2017 at 9:34 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes: > >> On Sun, Jan 8, 2017 at 4:46 AM, Junio C Hamano <gitster@pobox.com> wrote: >>> Christian Couder <christian.couder@gmail.com> writes: >>> >>>> So what should we do if freshen_file() returns 0 which means that the >>>> freshening failed? >>> >>> You tell me ;-) as you are the one who is proposing this feature. >> >> My answer is, we are not worse than freshening loose objects case >> (especially since I took the idea from there). > > I do not think so, unfortunately. Loose object files with stale > timestamps are not removed as long as objects are still reachable.
But there are plenty of unreachable loose objects, added in index, then got replaced with new versions. cache-tree can create loose trees too and it's been run more often, behind user's back, to take advantage of the shortcut in unpack-trees.
> For the base/shared index file, the timestamp is the only thing that > protects them from pruning, unless it is serving as the base file > for the currently active $GIT_DIR/index that is split.
-- Duy