gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

worktree cache with attributes support

Open Byron opened this issue 2 years ago • 0 comments

A way to obtain a set of attributes given a path, efficiently.

Each path we handle needs one lookup there during checkout, thus it must be lazy and per thread.

git seems to implement it as stack which is efficient if similar paths are handled together, and then drops information as it is no longer needed. This seems like the way to go as we never have to optimize for random access.

Tasks

  • [ ] implement attribute stack, note it's different from the one for excludes.
    • [ ] test for and implement differences (compared to excludes) on how paths match there. It has no directory special case so doing nothing should do the job
  • [ ] git pathspec parsing to sanitize input paths for upcoming subcommands, mind the trailing slash cleanup
  • [ ] gix repo attribute query/verify
  • [ ] A test tool to collect gitattribute and maybe gitignore information from real-world git repos along with the replies by git check-attr to have baselines against which to test our implementation.

Byron avatar Apr 30 '22 02:04 Byron