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

Re: [PATCH v2 22/22] untracked cache: guard and disable on system changes

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:02:53

On Sat, Nov 8, 2014 at 4:39 AM, Nguyễn Thái Ngọc Duy [off-list ref] wrote:
quoted hunk ↗ jump to hunk
If the user enables untracked cache, then

 - move worktree to an unsupported filesystem
 - or simply upgrade OS
 - or move the whole (portable) disk from one machine to another
 - or access a shared fs from another machine

there's no guarantee that untracked cache can still function properly.
Record the worktree location and OS footprint in the cache. If it
changes, err on the safe side and disable the cache. The user can
'update-index --untracked-cache' again to make sure all conditions are
met.

This change does not cover all bases, you can fool it if you try
hard. The point is to stop accidents.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
diff --git a/test-dump-untracked-cache.c b/test-dump-untracked-cache.c
index 710441e..25d855d 100644
--- a/test-dump-untracked-cache.c
+++ b/test-dump-untracked-cache.c
@@ -44,6 +44,7 @@ int main(int ac, char **av)
 {
        struct untracked_cache *uc;
        struct strbuf base = STRBUF_INIT;
+       setup_git_directory();
What is this change about? Is it related to the rest of this patch?
        if (read_cache() < 0)
                die("unable to read index file");
        uc = the_index.untracked;
--
2.1.0.rc0.78.gc0d8480
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help