1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-08 10:13:18 +01:00
git/builtin
Nguyễn Thái Ngọc Duy 1e8fef609e untracked cache: guard and disable on system changes
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 adds a new requirement that setup_git_directory* must be called
before read_cache() because we need worktree location by then, or the
cache is dropped.

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

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-12 13:45:18 -07:00
..
add.c standardize usage info string format 2015-01-14 09:32:04 -08:00
annotate.c
apply.c Merge branch 'jc/apply-ws-fix-expands-report' 2015-03-03 14:37:02 -08:00
archive.c
bisect--helper.c
blame.c Merge branch 'es/blame-commit-info-fix' 2015-02-22 12:28:24 -08:00
branch.c standardize usage info string format 2015-01-14 09:32:04 -08:00
bundle.c
cat-file.c Merge branch 'ah/usage-strings' 2015-02-11 13:44:20 -08:00
check-attr.c standardize usage info string format 2015-01-14 09:32:04 -08:00
check-ignore.c standardize usage info string format 2015-01-14 09:32:04 -08:00
check-mailmap.c standardize usage info string format 2015-01-14 09:32:04 -08:00
check-ref-format.c standardize usage info string format 2015-01-14 09:32:04 -08:00
checkout-index.c standardize usage info string format 2015-01-14 09:32:04 -08:00
checkout.c standardize usage info string format 2015-01-14 09:32:04 -08:00
clean.c Merge branch 'ja/clean-confirm-i18n' 2015-03-06 15:02:30 -08:00
clone.c standardize usage info string format 2015-01-14 09:32:04 -08:00
column.c standardize usage info string format 2015-01-14 09:32:04 -08:00
commit-tree.c commit-tree: simplify parsing of option -S using skip_prefix() 2014-12-29 09:32:45 -08:00
commit.c status: enable untracked cache 2015-03-12 13:45:17 -07:00
config.c standardize usage info string format 2015-01-14 09:32:04 -08:00
count-objects.c
credential.c
describe.c standardize usage info string format 2015-01-14 09:32:04 -08:00
diff-files.c standardize usage info string format 2015-01-14 09:32:04 -08:00
diff-index.c standardize usage info string format 2015-01-14 09:32:04 -08:00
diff-tree.c standardize usage info string format 2015-01-14 09:32:04 -08:00
diff.c
fast-export.c
fetch-pack.c standardize usage info string format 2015-01-14 09:32:04 -08:00
fetch.c Merge branch 'mh/refs-have-new' 2015-03-05 12:45:39 -08:00
fmt-merge-msg.c standardize usage info string format 2015-01-14 09:32:04 -08:00
for-each-ref.c Merge branch 'rs/simple-cleanups' 2015-03-05 12:45:42 -08:00
fsck.c standardize usage info string format 2015-01-14 09:32:04 -08:00
gc.c standardize usage info string format 2015-01-14 09:32:04 -08:00
get-tar-commit-id.c
grep.c Merge branch 'nd/grep-exclude-standard-help-fix' 2015-03-06 15:02:27 -08:00
hash-object.c standardize usage info string format 2015-01-14 09:32:04 -08:00
help.c standardize usage info string format 2015-01-14 09:32:04 -08:00
index-pack.c Merge branch 'js/fsck-tag-validation' 2014-12-22 12:27:41 -08:00
init-db.c standardize usage info string format 2015-01-14 09:32:04 -08:00
interpret-trailers.c
log.c Merge branch 'ah/usage-strings' 2015-02-11 13:44:20 -08:00
ls-files.c standardize usage info string format 2015-01-14 09:32:04 -08:00
ls-remote.c standardize usage info string format 2015-01-14 09:32:04 -08:00
ls-tree.c ls-tree: disable negative pathspec because it's not supported 2014-12-01 11:33:45 -08:00
mailinfo.c standardize usage info string format 2015-01-14 09:32:04 -08:00
mailsplit.c
merge-base.c standardize usage info string format 2015-01-14 09:32:04 -08:00
merge-file.c Merge branch 'ab/merge-file-prefix' 2015-02-22 12:28:25 -08:00
merge-index.c standardize usage info string format 2015-01-14 09:32:04 -08:00
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c standardize usage info string format 2015-01-14 09:32:04 -08:00
mktag.c
mktree.c
mv.c standardize usage info string format 2015-01-14 09:32:04 -08:00
name-rev.c standardize usage info string format 2015-01-14 09:32:04 -08:00
notes.c standardize usage info string format 2015-01-14 09:32:04 -08:00
pack-objects.c pack-objects: use --objects-edge-aggressive for shallow repos 2014-12-29 09:58:25 -08:00
pack-redundant.c standardize usage info string format 2015-01-14 09:32:04 -08:00
pack-refs.c standardize usage info string format 2015-01-14 09:32:04 -08:00
patch-id.c
prune-packed.c standardize usage info string format 2015-01-14 09:32:04 -08:00
prune.c
push.c Merge branch 'sb/atomic-push' 2015-02-11 13:43:51 -08:00
read-tree.c
receive-pack.c ref_transaction_delete(): remove "have_old" parameter 2015-02-17 11:23:48 -08:00
reflog.c reflog: improve and update documentation 2015-03-05 12:35:36 -08:00
remote-ext.c
remote-fd.c
remote.c Merge branch 'ah/usage-strings' 2015-02-11 13:44:20 -08:00
repack.c standardize usage info string format 2015-01-14 09:32:04 -08:00
replace.c ref_transaction_update(): remove "have_old" parameter 2015-02-17 11:22:50 -08:00
rerere.c standardize usage info string format 2015-01-14 09:32:04 -08:00
reset.c
rev-list.c
rev-parse.c standardize usage info string format 2015-01-14 09:32:04 -08:00
revert.c standardize usage info string format 2015-01-14 09:32:04 -08:00
rm.c standardize usage info string format 2015-01-14 09:32:04 -08:00
send-pack.c send-pack.c: add --atomic command line argument 2015-01-07 19:56:44 -08:00
shortlog.c standardize usage info string format 2015-01-14 09:32:04 -08:00
show-branch.c Merge branch 'ah/usage-strings' 2015-02-11 13:44:20 -08:00
show-ref.c standardize usage info string format 2015-01-14 09:32:04 -08:00
stripspace.c
symbolic-ref.c standardize usage info string format 2015-01-14 09:32:04 -08:00
tag.c ref_transaction_update(): remove "have_old" parameter 2015-02-17 11:22:50 -08:00
unpack-file.c
unpack-objects.c index-pack: terminate object buffers with NUL 2014-12-09 11:56:37 -08:00
update-index.c untracked cache: guard and disable on system changes 2015-03-12 13:45:18 -07:00
update-ref.c ref_transaction_verify(): new function to check a reference's value 2015-02-17 11:24:59 -08:00
update-server-info.c
upload-archive.c
var.c
verify-commit.c standardize usage info string format 2015-01-14 09:32:04 -08:00
verify-pack.c standardize usage info string format 2015-01-14 09:32:04 -08:00
verify-tag.c standardize usage info string format 2015-01-14 09:32:04 -08:00
write-tree.c