summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-01-24 16:28:21 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-25 12:40:17 -0800
commit0e0f761842eafb51c1a5d93fbc84470e2d7ee7c3 (patch)
tree75a11592ec94f7fe242f7723376fd427f1502381 /read-cache.c
parent07b29bfd8d3de9a16c1c93e285b6980ca6b77b45 (diff)
downloadgit-0e0f761842eafb51c1a5d93fbc84470e2d7ee7c3.tar.gz
dir: simplify untracked cache "ident" field
It is not a good idea to compare kernel versions and disable the untracked cache if it changes, as people may upgrade and still want the untracked cache to work. So let's just compare work tree locations and kernel name to decide if we should disable it. Also storing many locations in the ident field and comparing to any of them can be dangerous if GIT_WORK_TREE is used with different values. So let's just store one location, the location of the current work tree. The downside is that untracked cache can only be used by one type of OS for now. Exporting a git repo to different clients via a network to e.g. Linux and Windows means that only one can use the untracked cache. If the location changed in the ident field and we still want an untracked cache, let's delete the cache and recreate it. Note that if an untracked cache has been created by a previous Git version, then the kernel version is stored in the ident field. As we now compare with just the kernel name the comparison will fail and the untracked cache will be disabled until it's recreated. Helped-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
0 files changed, 0 insertions, 0 deletions