mirror of
https://github.com/borgbackup/borg.git
synced 2026-03-23 19:05:33 -04:00
* make constants for files cache mode more clear Traditionally, DEFAULT_FILES_CACHE_MODE_UI and DEFAULT_FILES_CACHE_MODE were - as the naming scheme implies - the same setting, one being the UI representation as given to the --files-cache command line option and the other being the same default value in the internal representation. It happended that the actual value used in borg create always comes from DEFAULT_FILES_CACHE_MODE_UI (because that does have the --files-cache option) whereas for all other commands (that do not use the files cache) it comes from DEFAULT_FILES_CACHE_MODE. PR #5777 then abused this fact to implement the optimisation to skip loading of the files cache in those other commands by changing the value of DEFAULT_FILES_CACHE_MODE to disabled. This however also changes the meaning of that variable and thus redesignates it to something not matching the original naming anymore. Anyone not aware of this change and the intention behind it looking at the code would have a hard time figuring this out and be easily mislead. This does away with the confusion making the code more maintainable by renaming DEFAULT_FILES_CACHE_MODE to FILES_CACHE_MODE_DISABLED, making the new intention of that internal default clear. * make constant for files cache mode UI default match naming scheme |
||
|---|---|---|
| .. | ||
| algorithms | ||
| cache_sync | ||
| crypto | ||
| platform | ||
| testsuite | ||
| __init__.py | ||
| __main__.py | ||
| _chunker.c | ||
| _endian.h | ||
| _hashindex.c | ||
| archive.py | ||
| archiver.py | ||
| cache.py | ||
| chunker.pyx | ||
| compress.pyx | ||
| constants.py | ||
| fuse.py | ||
| hashindex.pyx | ||
| helpers.py | ||
| item.pyx | ||
| locking.py | ||
| logger.py | ||
| lrucache.py | ||
| nanorst.py | ||
| paperkey.html | ||
| patterns.py | ||
| remote.py | ||
| repository.py | ||
| selftest.py | ||
| shellpattern.py | ||
| upgrader.py | ||
| version.py | ||
| xattr.py | ||