-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
git-config towards 1.0 #331
Labels
C-tracking-issue
An issue to track to track the progress of multiple PRs or issues
Comments
Byron
added
the
C-tracking-issue
An issue to track to track the progress of multiple PRs or issues
label
Feb 8, 2022
Byron
pushed a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 15, 2022
…eLabs#331) Add a `Path` type to the `git_config::values` which can be interpolated according to gits own path interpolation rules.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
…bs#331) The lack of context would make %(prefix)/… paths generally fail which makes the API prone to misuse. This probably means that another API needs to be added to facilitate obtaining paths while providing a way to pass the context, too. For now having the `Path` type as intermediary seems sufficient, but also might point towards other a more approach.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
This composes better with other errors, if necessary.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
…f` (GitoxideLabs#331) That way users will want to call it or something like it in order to make use of the `Path`, which otherwise is just a bunch of bytes which aren't very useful at all in standard Rust. Keeping the `Path` wrapper type is probably the right choice as it matches the current API and allows to get paths explicitly which can then be interpolated in just another step.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Always a good idea to run all tests beforehand.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Always a good idea to run all tests beforehand.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Always a good idea to run all tests beforehand.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 20, 2022
Always a good idea to run all tests beforehand.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 21, 2022
This means we don't necessarily enforce slashes everywhere. Intiially the implementation was meant to be as close to `git` as possible, even though certain requirements there stem from the assumption that the path separtor is `/`. In Rust, however, we now return `std::path::Path` which deals with that for us and allows to operate on paths more comfortably and safely. We now leverage this fully even if that means that the paths we output aren't entirely conformant with what git would use, but it's an implementation detail. Lastly, the interpolated path is a transformation step so there should be no easy way to accidentally put that version of the path back into the file, which would be undesirable due to the various transformations.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 21, 2022
) Previously PathError was meant to be used primarily in `Path::try_from()` so a case could be made to give it that name. Now the error is exclusive to `Path`, so that should be reflected in the module location as well. This helps with organizing the code as well, putting everything related to Path into its own module, which helps refactoring later.
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Feb 21, 2022
Byron
pushed a commit
that referenced
this issue
Feb 21, 2022
Add a `Path` type to the `git_config::values` which can be interpolated according to gits own path interpolation rules.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
Byron
added a commit
that referenced
this issue
Feb 21, 2022
The lack of context would make %(prefix)/… paths generally fail which makes the API prone to misuse. This probably means that another API needs to be added to facilitate obtaining paths while providing a way to pass the context, too. For now having the `Path` type as intermediary seems sufficient, but also might point towards other a more approach.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
This composes better with other errors, if necessary.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
Byron
added a commit
that referenced
this issue
Feb 21, 2022
…f` (#331) That way users will want to call it or something like it in order to make use of the `Path`, which otherwise is just a bunch of bytes which aren't very useful at all in standard Rust. Keeping the `Path` wrapper type is probably the right choice as it matches the current API and allows to get paths explicitly which can then be interpolated in just another step.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
Always a good idea to run all tests beforehand.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
This means we don't necessarily enforce slashes everywhere. Intiially the implementation was meant to be as close to `git` as possible, even though certain requirements there stem from the assumption that the path separtor is `/`. In Rust, however, we now return `std::path::Path` which deals with that for us and allows to operate on paths more comfortably and safely. We now leverage this fully even if that means that the paths we output aren't entirely conformant with what git would use, but it's an implementation detail. Lastly, the interpolated path is a transformation step so there should be no easy way to accidentally put that version of the path back into the file, which would be undesirable due to the various transformations.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
Previously PathError was meant to be used primarily in `Path::try_from()` so a case could be made to give it that name. Now the error is exclusive to `Path`, so that should be reflected in the module location as well. This helps with organizing the code as well, putting everything related to Path into its own module, which helps refactoring later.
Byron
added a commit
that referenced
this issue
Feb 21, 2022
Byron
added a commit
to svetli-n/gitoxide
that referenced
this issue
Mar 17, 2022
Byron
added a commit
that referenced
this issue
Jul 21, 2022
Byron
added a commit
that referenced
this issue
Jul 21, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
…onsiders. (#331) Filters allow to narrow down the output.
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Byron
added a commit
that referenced
this issue
Jul 22, 2022
That way, applications which want to display or work with configuration files can do so.
Byron
added a commit
that referenced
this issue
Jul 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An issue to see what's missing to make
git-config
comfortably usable bygit-repository
.Tasks
anymore as query entails git-sec.
global
config instantiation (the one without a local repository)k
andk=
losslessly during serializationstd::io::Write
#456Repository::init()
config withgit-config
(i.e. fs capabilities) #457Colors
(e.g. hex input, attributes, inverted attributes, order independence) - validatebstr
internally instead of[u8]
flock
config files before reading themflock
.from_env()
should pick it up too).incldudeIf
dotted-key notation works forGIT_CONFIG_KEY
as well, see TODO and related comment.unicode-bom
will do the job well.GitConfig
can do it allgix repo config
to print all values, helpful to test errorscargo doc
Related Discussions
Towards 2.0
git-date
comfort.rs
.Other Ramblings
git-config
use self-referential structures like inignore
to avoid copying everything intoCow<'static, [u8]>
effectively.The text was updated successfully, but these errors were encountered: