Do tools like git have tricks for optimizing the directory search for config files, or do they simply walk up the filesystem every time?
-
-
-
Replying to @cwonrails
Like are there ways it can cache information like "the .git directory of /proj/foobar/a/b/c is /proj/foobar/.git"?
2 replies 0 retweets 1 like -
Replying to @littlecalculist @cwonrails
Or every time you type `git <whatever>` from /proj/foobar/a/b/c is it searching up the filesystem to find /proj/foobar/.git?
2 replies 0 retweets 1 like -
Replying to @littlecalculist
What would the benefit of git not traversing up the file system? Say you've cded into foo/src and edit file src/index.js then git <whatever>
1 reply 0 retweets 0 likes -
Replying to @cwonrails
It would just be a caching optimization, but I don't know if that's possible to do outside of the OS.
3 replies 0 retweets 1 like -
Replying to @littlecalculist @cwonrails
The only way to do correct manual caching would be to use a constantly running daemon using inotify to watch for changes, I think.
3 replies 0 retweets 3 likes
turns out the kernel is such a daemon...
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.