-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
bare clone
for git-repository
#551
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For now without any handling of removing previous values.
…y named section. We also add `File::remove_section_by_id()` to make it possible to remove specific sections.
…d mutate them. As section names are not unique, it was previously not possible to iterate sections and then mutate them as one wouldn't be able to refer to the exact section that was just traversed, after all, there can be many sections named `remote "origin"`. With the new methods it's possible to uniquely refer to each section for mutation and removal.
Previously, newlines would remain past a value, and whitespace could remain before one. Now both are removed to simulate removing an actual line.
Much better whitespace handling definitely shows here.
It also showed that we aren't quite lossless with our urls yet.
Previously a url like `/path/to/repo` would serialize to `file:///path/to/repo`, preventing round-trips. Now it serializes like it was parsed. This also means that `file://path` still serializes as `file://path`.
Previously `git@host:path` would turn into `ssh://git@host/path`, which now remains exactly as is.
It's explicitly a multi-step process and maybe the function names could represent that better.
…realize that subsection/remote-name validation is incorrect here and in another place that needs fixing.
It can be useful to validate subsection names without having to construct an entire `Header` (which also includes a name).
…n't handled correctly yet
…tances instead That lifetime unnecessarily complicated things and wasn't worth keeping due to being a premature optimization.
18 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cloning is essentially initializing a new repository, adding a remote, and fetching the pack based on the standard refspecs.
There are some subtleties with local clones for instance that are to be validated - maybe these are happening naturally as they are typical for tests.
It will be interesting to figure out an API that can work without having to pass massive Options structures just to pre-fill methods that are called later, as such it's OK to be more low-level at first to one day get a 'one method call' counterpart with common options.
Tasks
Out of scope