-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gix-worktree
and gix-index
(checkout, status, commit)
#301
Labels
C-tracking-issue
An issue to track to track the progress of multiple PRs or issues
Comments
Byron
added a commit
that referenced
this issue
Feb 7, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
The latter should be useful when fully implementing all required baseline capabilities of doing a correct checkout
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Feb 28, 2022
Byron
added a commit
that referenced
this issue
Mar 1, 2022
Byron
added a commit
that referenced
this issue
Mar 1, 2022
Byron
added a commit
that referenced
this issue
Mar 2, 2022
For now they are unused but that should change when doing collision checks.
Byron
added a commit
that referenced
this issue
May 18, 2022
This also works if the work-tree can't be found but it is otherwise a valid git dir.
Byron
added a commit
that referenced
this issue
May 18, 2022
Byron
added a commit
that referenced
this issue
May 18, 2022
Byron
added a commit
that referenced
this issue
May 18, 2022
Byron
added a commit
that referenced
this issue
Jun 30, 2022
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
10000
Aug 7, 2022
git-worktree
and git-index
git-worktree
and git-index
(checkout, status, commit)
Byron
added a commit
that referenced
this issue
Feb 17, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
Mar 17, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
Mar 20, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
Apr 2, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
Apr 4, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
Byron
added a commit
that referenced
this issue
Apr 12, 2023
Really just an excuse to start a new PR for additional attribute work without investing much time.
git-worktree
and git-index
(checkout, status, commit)gix-worktree
and gix-index
(checkout, status, commit)
EliahKagan
added a commit
to EliahKagan/gitoxide
that referenced
this issue
Feb 15, 2025
The `to_unix_separators` and `to_windows_separators` functions in `gix_path::convert` had TODO comments saying they should use the `path-slash` crate "to handle escapes". These comments were added as part of e4f4c4b (GitoxideLabs#397) but the context there and in the broader related issue GitoxideLabs#301 does not seem to clarify the basis for this. It is not really clear what handling escapes would entail here, and it seems like there is not a way to do it without substantially changing the interface of these conversion functions in `gix-path`, which currently take a single argument representing a path and return a single string-like value also representing a path. If escape sequences appaer in the input to such a path conversion function, it would not have a way to know if they are meant literally or as escape sequences. (An analogous concern applies if a function is to add escape sequences in its return value; it would have no way to know if the caller expects them.) Furthermore, while `path-slash` can convert some `\` paths to use `/` instead, it does not appear to do anything related to handling escape sequencs or distinguishing which occurrences of `\` or any other character may be intended as part of an escape sequence. Its documentation does prominently mention that `\` in escape sequnces should not be converted to `/`: > On Unix-like OS, the path separator is `/`. So any conversion is > not necessary. But on Windows, the file path separator is `\`, > and needs to be replaced with `/` for converting the paths to > "slash paths". Of course, `\`s used for escaping characters > should not be replaced. But it looks like the part about `\` characters used for escaping is meant as advice on how and when to use `path-slash`, rather than meaning that `path-slash` would itself be able to distinguish between `\` characters meant as directory separators and `\` characters that perform quoting/escaping.
EliahKagan
added a commit
to EliahKagan/gitoxide
that referenced
this issue
Feb 15, 2025
The `to_unix_separators` and `to_windows_separators` functions in `gix_path::convert` had TODO comments saying they should use the `path-slash` crate "to handle escapes". These comments were added as part of e4f4c4b (GitoxideLabs#397) but the context there and in the broader related issue GitoxideLabs#301 does not seem to clarify the basis for this. It is not really clear what handling escapes would entail here, and it seems like there is not a way to do it without substantially changing the interface of these conversion functions in `gix-path`, which currently take a single argument representing a path and return a single string-like value also representing a path. If escape sequences appear in the input to such a path conversion function, it would not have a way to know if they are meant literally or as escap 4FBC e sequences. (An analogous concern applies if a function is to add escape sequences in its return value; it would have no way to know if the caller expects them.) Furthermore, while `path-slash` can convert some `\` paths to use `/` instead, it does not appear to do anything related to handling escape sequences or distinguishing which occurrences of `\` or any other character may be intended as part of an escape sequence. Its documentation (https://docs.rs/path-slash/latest/path_slash/) does prominently mention that `\` in escape sequences should not be converted to `/`: > On Unix-like OS, the path separator is `/`. So any conversion is > not necessary. But on Windows, the file path separator is `\`, > and needs to be replaced with `/` for converting the paths to > "slash paths". Of course, `\`s used for escaping characters > should not be replaced. But it looks like the part about `\` characters used for escaping is meant as advice on how and when to use `path-slash`, rather than meaning that `path-slash` would itself be able to distinguish between `\` characters meant as directory separators and `\` characters that perform quoting/escaping.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that we handle both crates here as they are very much intertwined.
git-index
handles the data structure to accelerate operations in thegit-worktree
for 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 -a
with bare supportgix index entries
with attributes listing #830git check-attr
to 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.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 intogitoxide
need to be turned into precomposed forms.clap
can be initialized from precomposed unicode OsStrings instead, a feature ultimately to be provided togix
users.gix-index
towards 1.0 #293Reset
gix
reset withsoft/mixed/hard/merge/keep
semantics with pathspecs as well. Submodule support should be possible, too.gix-worktree-state
reset to reset a working tree according to to an index, with pathspec support.Out of scope
git reset -p
)Tasks for
add
Add files to the index.
git-pathspec
Tasks for
commit
Tasks for
fetch/clone
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.
@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
walkdir
orsymlink_metadata
per index entry? Note thatwalkdir
doesn't use ``file_size >= u32::MAX
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.untracked-cache
to be faster. Could be coming 'for free' if walkdir would be useddescribe
Checkout Research
Follow Ups
remove_symlink()
from this crate, but can't use it for relative paths due to the filename checkThe text was updated successfully, but these errors were encountered: