You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that we handle both crates here as they are very much intertwined. git-index handles the data structure to accelerate operations in the git-worktree for actually manipulating the working copy.
Tasks for checkout
checkout entire index OR checkout from tree (in case the index doesn't exist yet).
This would allow the index to be created while we are checking out, maybe there is a benefit.
probing of the file system - needed to set configuration options accordingly
when we get into the sub-second area the parallelization costs get higher than doing the actual work - but we couldn't make it faster with different parallelization, tried non-blockwise
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.
figure out how this affects diffs of changed files - they should probably apply worktree conversions beforehand, right? - For now it's fine to no run filters when diffing files between diffs, because they are all in-git and thus normalized.
when reading attributes and ignore files from index, would filters affect them significantly and should these be applied? Probably No, actually, filters aren't applied to the files the control them.
What about precomposeUnicode on MacOS? Some path conversion for more compatibility, we should probably do that too. Out-scope if it belongs elsewhere. This means that all paths going into gitoxide need to be turned into precomposed forms.
See if clap can be initialized from precomposed unicode OsStrings instead, a feature ultimately to be provided to gix users.
non-exclusive checkout
there is a lot of logic to be researched to do the right thing when supporting checkouts into a populated working tree.
path-specs are needed to properly define what to checkout, even though some convenience APIs might exist to allow checkouts of individual files (i.e. more program driven checkouts)
round-trippable reads and writes (write all index extensions to not degenerate information)
Tasks for fetch/clone
create index from tree
can there be an optimization that keeps what didn't change?
Tasks for status
The difference between an index and the work tree. Analysis TBD.
See this blog post for incredible details on how git does things, related to fs-monitor as well.
There is also an alternative implementation which provides a lot of details on how to be better. Pascal Kuthe (@pascalkuthe) did a first analysis and concluded that most of the speedup came through congestion-free multi-threading and the usage of something like the untracked-cache. On Linux, it's possible to also speedup syscalls using more specific versions of it, but that should definitely be left as last resort for performance improvements.
Question: what's faster: walkdir or symlink_metadata per index entry? Note that walkdir doesn't use ``
rename/copy tracking - should be based on tree-tree rename tracking, can it be generalized?
assure status works with file_size >= u32::MAX
currently it's acknowledged in the documentation but there is no test for that, nor is it clear how this works in git.
determine staged changes
compare tree entries with index entries
Question: is there a way to avoid having to traverse a tree recursively? Yes, use the TREE extension to know the dir ids of all entries, which allows to reproduce the trees and see if they changed, and only if so we lookup the tree itself.
find untracked files
can use untracked-cache to be faster. Could be coming 'for free' if walkdir would be used
fast is-dirty checks - and wiring that up to describe
Note that we handle both crates here as they are very much intertwined.
git-indexhandles the data structure to accelerate operations in thegit-worktreefor actually manipulating the working copy.Tasks for checkout
fclose()without performance loss due to silent and implicit close on drop.fs::Cache) and support for various sources. attributes for worktree-cache #818gix index entries -awith bare supportgix index entrieswith attributes listing #830git check-attrto have baselines against which to test our implementation.gix attributes query#846woring-tree-encoding. Viable crate is encoding_rsProbablyNo, actually, filters aren't applied to the files the control them.precomposeUnicodeon MacOS? Some path conversion for more compatibility, we should probably do that too. Out-scope if it belongs elsewhere. This means that all paths going intogitoxideneed to be turned into precomposed forms.clapcan be initialized from precomposed unicode OsStrings instead, a feature ultimately to be provided togixusers.gix-indextowards 1.0 #293Reset
gixreset withsoft/mixed/hard/merge/keepsemantics with pathspecs as well. Submodule support should be possible, too.gix-worktree-statereset to reset a working tree according to to an index, with pathspec support.Out of scope
git reset -p)Tasks for
addAdd files to the index.
git-pathspecTasks for
commitTasks for
fetch/cloneTasks for
statusThe difference between an index and the work tree. Analysis TBD.
See this blog post for incredible details on how git does things, related to fs-monitor as well.
There is also an alternative implementation which provides a lot of details on how to be better.
Pascal Kuthe (@pascalkuthe) did a first analysis and concluded that most of the speedup came through congestion-free multi-threading and the usage of something like the untracked-cache. On Linux, it's possible to also speedup syscalls using more specific versions of it, but that should definitely be left as last resort for performance improvements.
Stages
walkdirorsymlink_metadataper index entry? Note thatwalkdirdoesn't use ``file_size >= u32::MAXTREEextension to know the dir ids of all entries, which allows to reproduce the trees and see if they changed, and only if so we lookup the tree itself.untracked-cacheto be faster. Could be coming 'for free' if walkdir would be useddescribeCheckout Research
Follow Ups
remove_symlink()from this crate, but can't use it for relative paths due to the filename check