<feed xmlns='http://www.w3.org/2005/Atom'>
<title>projectile.git/test/projectile-test.el, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/'/>
<entry>
<title>Persist disk cache in projectile-purge-dir-from-cache</title>
<updated>2026-04-27T07:48:07+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-27T07:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=fc8559850228f54efbc7ee4ea56b2e376cec5b04'/>
<id>fc8559850228f54efbc7ee4ea56b2e376cec5b04</id>
<content type='text'>
`projectile-purge-file-from-cache' writes the updated file list to
disk under persistent caching; the directory variant only mutated
the in-memory hash, so the purged subtree would reappear on the
next Emacs session.  Mirror the persistence step here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`projectile-purge-file-from-cache' writes the updated file list to
disk under persistent caching; the directory variant only mutated
the in-memory hash, so the purged subtree would reappear on the
next Emacs session.  Mirror the persistence step here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Seed cache time when loading the project file cache from disk</title>
<updated>2026-04-27T01:27:35+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-27T01:27:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=a55eeb2b1821c5252a5ea3d8c7c79728a42763fe'/>
<id>a55eeb2b1821c5252a5ea3d8c7c79728a42763fe</id>
<content type='text'>
Without this, `projectile-files-cache-expire' combined with persistent
caching ended up re-reading the cache file from disk on every call to
`projectile-project-files' and never reindexing: the TTL check at the
top of `projectile-project-files' evicts the in-memory entry whenever
its cache time is missing, and `projectile-load-project-cache' was
populating only `projectile-projects-cache' on disk loads.  Use the
cache file's mtime as the recorded time, so the TTL check sees a real
age and reindexing happens when (and only when) the data is actually
stale.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this, `projectile-files-cache-expire' combined with persistent
caching ended up re-reading the cache file from disk on every call to
`projectile-project-files' and never reindexing: the TTL check at the
top of `projectile-project-files' evicts the in-memory entry whenever
its cache time is missing, and `projectile-load-project-cache' was
populating only `projectile-projects-cache' on disk loads.  Use the
cache file's mtime as the recorded time, so the TTL check sees a real
age and reindexing happens when (and only when) the data is actually
stale.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backfill tests for indexing command dispatch</title>
<updated>2026-04-26T11:29:59+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T11:29:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=366049b8f4a14fc1842ae264e6544bdc279308b5'/>
<id>366049b8f4a14fc1842ae264e6544bdc279308b5</id>
<content type='text'>
`projectile-get-ext-command' had no direct test coverage, so the
non-git VCS branches (hg/svn/bzr/darcs/fossil/pijul/sapling/jj) were
relying on indirect coverage that didn't actually exercise the
dispatch. Add a `describe' block that pins each branch.

Also extend the `projectile-dir-files-alien' tests with two cases
that were previously uncovered: the fd path for git (verifying we
don't also call `projectile-git-deleted-files') and the no-VCS
fallback (verifying the generic command is used).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`projectile-get-ext-command' had no direct test coverage, so the
non-git VCS branches (hg/svn/bzr/darcs/fossil/pijul/sapling/jj) were
relying on indirect coverage that didn't actually exercise the
dispatch. Add a `describe' block that pins each branch.

Also extend the `projectile-dir-files-alien' tests with two cases
that were previously uncovered: the fd path for git (verifying we
don't also call `projectile-git-deleted-files') and the no-VCS
fallback (verifying the generic command is used).
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for the indexing fast-path helpers</title>
<updated>2026-04-26T11:13:04+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T11:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=ca5c96f6ed9d203f22f6d41a862449480dc46aec'/>
<id>ca5c96f6ed9d203f22f6d41a862449480dc46aec</id>
<content type='text'>
Cover the new internal helpers (`projectile--list-&gt;set',
`projectile--ignored-file-fast-p', `projectile--ignored-directory-
fast-p') and add end-to-end tests for the previously uncovered
behaviour:

* `projectile-index-directory' honors dirconfig glob ignore patterns
  at every directory level - previously only the alien-mode dirconfig
  warning had any test coverage for this.
* Ensure (`!') entries in `.projectile' override an ignore pattern.
* `projectile-remove-ignored' drops basename matches, treats `*'-
  prefixed ignored-dir entries as any-segment matches, and treats
  plain entries as path-prefix matches.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cover the new internal helpers (`projectile--list-&gt;set',
`projectile--ignored-file-fast-p', `projectile--ignored-directory-
fast-p') and add end-to-end tests for the previously uncovered
behaviour:

* `projectile-index-directory' honors dirconfig glob ignore patterns
  at every directory level - previously only the alien-mode dirconfig
  warning had any test coverage for this.
* Ensure (`!') entries in `.projectile' override an ignore pattern.
* `projectile-remove-ignored' drops basename matches, treats `*'-
  prefixed ignored-dir entries as any-segment matches, and treats
  plain entries as path-prefix matches.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for hybrid `+' keep batching</title>
<updated>2026-04-26T10:34:43+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T10:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=9ef4ffcf5f8187ca4ef501fd30e964e036449776'/>
<id>9ef4ffcf5f8187ca4ef501fd30e964e036449776</id>
<content type='text'>
`+' keep entries had no end-to-end test coverage. Add tests that verify:

* Multiple `+' keep entries trigger a single batched call to the
  external command, with the kept paths passed as the new pathspecs
  argument.
* The single-keep-dir case keeps going through `projectile-dir-files'
  for each subdirectory (no behavioural change there).
* `projectile--restricted-sub-projects-files' returns all submodule
  files when no subdirs are supplied, drops files outside the supplied
  subdirs when they are, and normalises subdirs without a trailing
  slash.

Also add a focused test for the new `pathspecs' argument of
`projectile-files-via-ext-command'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`+' keep entries had no end-to-end test coverage. Add tests that verify:

* Multiple `+' keep entries trigger a single batched call to the
  external command, with the kept paths passed as the new pathspecs
  argument.
* The single-keep-dir case keeps going through `projectile-dir-files'
  for each subdirectory (no behavioural change there).
* `projectile--restricted-sub-projects-files' returns all submodule
  files when no subdirs are supplied, drops files outside the supplied
  subdirs when they are, and normalises subdirs without a trailing
  slash.

Also add a focused test for the new `pathspecs' argument of
`projectile-files-via-ext-command'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for hybrid indexing</title>
<updated>2026-04-26T10:17:21+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T10:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=c65f0d4f77aa1db4a5c8f42dea44e10494629da0'/>
<id>c65f0d4f77aa1db4a5c8f42dea44e10494629da0</id>
<content type='text'>
The hybrid path through `projectile-dir-files` had zero direct
coverage. Add tests that verify it applies
`projectile-globally-ignored-file-suffixes` and dirconfig ignore
patterns on top of the alien result, and that the resolved VCS is
threaded through to `projectile-dir-files-alien` exactly once.

Also adds a focused test for `projectile-dir-files-alien` honoring an
explicitly supplied VCS argument without re-running
`projectile-project-vcs`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hybrid path through `projectile-dir-files` had zero direct
coverage. Add tests that verify it applies
`projectile-globally-ignored-file-suffixes` and dirconfig ignore
patterns on top of the alien result, and that the resolved VCS is
threaded through to `projectile-dir-files-alien` exactly once.

Also adds a focused test for `projectile-dir-files-alien` honoring an
explicitly supplied VCS argument without re-running
`projectile-project-vcs`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add projectile-discard-root-cache command (#1936)</title>
<updated>2026-04-26T06:49:03+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T06:49:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=66b54e9038c8aadf5a515758ca3c0acb03977b0e'/>
<id>66b54e9038c8aadf5a515758ca3c0acb03977b0e</id>
<content type='text'>
The existing projectile-invalidate-cache always tries to also clear
the per-project files cache, which means it either prompts for a
project (with prefix arg) or only operates when you're already in a
project.  Users who just created a marker file in a directory that
Projectile previously considered rootless ended up picking an
unrelated project from the prompt just to get the root cache
flushed.

projectile-discard-root-cache is a focused alternative that empties
projectile-project-root-cache only.  Wired into the menu next to the
existing 'Invalidate cache' entry; deliberately not bound on the
prefix map since the keymap is already dense.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing projectile-invalidate-cache always tries to also clear
the per-project files cache, which means it either prompts for a
project (with prefix arg) or only operates when you're already in a
project.  Users who just created a marker file in a directory that
Projectile previously considered rootless ended up picking an
unrelated project from the prompt just to get the root cache
flushed.

projectile-discard-root-cache is a focused alternative that empties
projectile-project-root-cache only.  Wired into the menu next to the
existing 'Invalidate cache' entry; deliberately not bound on the
prefix map since the keymap is already dense.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for previously untested root-detection paths</title>
<updated>2026-04-26T06:36:07+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T06:36:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=0070ea475a6b765b3379ed581d38657bf879cf81'/>
<id>0070ea475a6b765b3379ed581d38657bf879cf81</id>
<content type='text'>
- projectile-root-marked: default and custom dirconfig file, miss case
- projectile-root-local: returns the buffer-local var, ignores DIR
- projectile-root-bottom-up: matches a regular-file marker (e.g. git
  worktree's .git file)
- projectile-ensure-project: all three projectile-require-project-root
  branches (nil / t / 'prompt) plus the dir-non-nil pass-through
- projectile-acquire-root: the success path and the no-root delegation
- projectile-project-root: tramp-archive path unwrap, verified by
  observing the directory handed to a stub root function (a
  defvar-backed variable is needed because byte-compiled lexical
  closures don't propagate setq through cl-letf-mocked dispatch)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- projectile-root-marked: default and custom dirconfig file, miss case
- projectile-root-local: returns the buffer-local var, ignores DIR
- projectile-root-bottom-up: matches a regular-file marker (e.g. git
  worktree's .git file)
- projectile-ensure-project: all three projectile-require-project-root
  branches (nil / t / 'prompt) plus the dir-non-nil pass-through
- projectile-acquire-root: the success path and the no-root delegation
- projectile-project-root: tramp-archive path unwrap, verified by
  observing the directory handed to a stub root function (a
  defvar-backed variable is needed because byte-compiled lexical
  closures don't propagate setq through cl-letf-mocked dispatch)
</pre>
</div>
</content>
</entry>
<entry>
<title>Memoize per-function nil results in the root cache (#1836)</title>
<updated>2026-04-26T06:14:41+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T06:14:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=69adda8f55aaeedcee77948318c3e389665019db'/>
<id>69adda8f55aaeedcee77948318c3e389665019db</id>
<content type='text'>
Previously a root function returning nil stored nil in the cache,
which is indistinguishable from a missing entry, so on the next call
the function was re-run.  When a project's root is found by the third
function in projectile-project-root-functions, the first two
re-walked the tree on every call - and projectile-project-root is hot
in mode-line / company / spaceline updates.

Store the symbol 'none for unsuccessful entries and treat it as a
cache hit on lookup.  The overall-failure marker already used 'none
in a separate slot, so this just extends the same convention to the
per-function entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously a root function returning nil stored nil in the cache,
which is indistinguishable from a missing entry, so on the next call
the function was re-run.  When a project's root is found by the third
function in projectile-project-root-functions, the first two
re-walked the tree on every call - and projectile-project-root is hot
in mode-line / company / spaceline updates.

Store the symbol 'none for unsuccessful entries and treat it as a
cache hit on lookup.  The overall-failure marker already used 'none
in a separate slot, so this just extends the same convention to the
per-function entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip cache for projectile-root-local (#1211)</title>
<updated>2026-04-26T06:13:42+00:00</updated>
<author>
<name>Bozhidar Batsov</name>
<email>bozhidar@toptal.com</email>
</author>
<published>2026-04-26T06:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/projectile.git/commit/?id=67981d6d93b957edf3359d94f6216837427834bc'/>
<id>67981d6d93b957edf3359d94f6216837427834bc</id>
<content type='text'>
projectile-root-local reads the buffer-local projectile-project-root
variable rather than inspecting its DIR argument, so caching its
result by (FUNC . DIR) was wrong: two buffers visiting the same
directory but with different file-local overrides would share the
first buffer's cached answer.  Skip the cache for this function
specifically - it's a single variable read, no FS work to amortize.

Adds a regression test that visits two buffers with different
file-local roots from the same default-directory and confirms each
sees its own override.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
projectile-root-local reads the buffer-local projectile-project-root
variable rather than inspecting its DIR argument, so caching its
result by (FUNC . DIR) was wrong: two buffers visiting the same
directory but with different file-local overrides would share the
first buffer's cached answer.  Skip the cache for this function
specifically - it's a single variable read, no FS work to amortize.

Adds a regression test that visits two buffers with different
file-local roots from the same default-directory and confirms each
sees its own override.
</pre>
</div>
</content>
</entry>
</feed>
