Skip to content

Commit

Permalink
Direnv support
Browse files Browse the repository at this point in the history
Direnv <https://direnv.net> is a tool for tracking your local developer
environment. With the rise of Nix popularity & its hooks for local Nix
development, this tool has become quite popular, but it caches changes
in a local directory that makes Tup noisy.

This commit is a duplicate of another proposed patch, however, unlike
that patchset, this is standalone.
  • Loading branch information
toastal committed Sep 2, 2024
1 parent ca3e977 commit 7d4954d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tup/pel_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ int pel_ignored(const char *path, int len)
return 1;
if(len == 7 && strncmp(path, ".ccache", 7) == 0)
return 1;
if(len == 7 && strncmp(path, ".direnv", 7) == 0)
return 1;
/* See also fuse_fs.c:is_hidden() */
return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions src/tup/server/fuse_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static int is_hidden(const char *path)
return 1;
if(strstr(path, "/_darcs") != NULL)
return 1;
if(strstr(path, "/.direnv") != NULL)
return 1;
if(is_ccache_path(path))
return 1;
return 0;
Expand Down

0 comments on commit 7d4954d

Please sign in to comment.