]> git.madduck.net Git - etc/vim.git/blobdiff - docs/ignoring_unmodified_files.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Docker CI: Add missed Checkout step (#2128)
[etc/vim.git] / docs / ignoring_unmodified_files.md
deleted file mode 120000 (symlink)
index 4484bfad2c3a139cb6acc005bbdcd44cbb094766..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-_build/generated/ignoring_unmodified_files.md
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..a915f4e867806f4389518900db9f6598d0b9dbc7
--- /dev/null
@@ -0,0 +1,23 @@
+[//]: # "NOTE: THIS FILE WAS AUTOGENERATED FROM README.md"
+
+# Ignoring unmodified files
+
+_Black_ remembers files it has already formatted, unless the `--diff` flag is used or
+code is passed via standard input. This information is stored per-user. The exact
+location of the file depends on the _Black_ version and the system on which _Black_ is
+run. The file is non-portable. The standard location on common operating systems is:
+
+- Windows:
+  `C:\\Users\<username>\AppData\Local\black\black\Cache\<version>\cache.<line-length>.<file-mode>.pickle`
+- macOS:
+  `/Users/<username>/Library/Caches/black/<version>/cache.<line-length>.<file-mode>.pickle`
+- Linux:
+  `/home/<username>/.cache/black/<version>/cache.<line-length>.<file-mode>.pickle`
+
+`file-mode` is an int flag that determines whether the file was formatted as 3.6+ only,
+as .pyi, and whether string normalization was omitted.
+
+To override the location of these files on macOS or Linux, set the environment variable
+`XDG_CACHE_HOME` to your preferred location. For example, if you want to put the cache
+in the directory you're running _Black_ from, set `XDG_CACHE_HOME=.cache`. _Black_ will
+then write the above files to `.cache/black/<version>/`.