This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Add Patch from text-document - #62
Merged
Merged
Conversation
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Max Brunsfeld <[email protected]>
* Compose Lines, HardTabs and SoftWraps transforms * Add passThrough operation for Transforms, so that they can preserve traversals created by their sources. Signed-off-by: Nathan Sobo <[email protected]>
We could always add an alias based on the Symbol if we wanted to support the protocol, but we shouldn’t be using the symbol in normal code.
Also, rename the Patch's 'regions' to 'hunks' Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Patches are becoming a central concept in this system. A patch is basically a function that takes input and produces output. This is clearer terminology than source and target and emphasizes the streaming/ transformational nature of the system. There’s a chance “input” could be confused with user input, but I don’t think it’s a big enough chance to not rename stuff.
Fixed a couple of functions to treat point-compatible array as a Point
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
Signed-off-by: Nathan Sobo <[email protected]>
This helps clarify that we’re talking about the index of the next child, rather than our index in the children of the parent. It seems simple but this helps my brain.
@maxbrunsfeld: Take a look at the new approach. I started storing the offset at each entry of the path (formerly stack) because I think it’s needed in order to adjust the extent of the parent nodes. This passes the patch specs but there’s lots of issues elsewhere. I think this is the right direction but the git history is all there if you disagree.
There's still a case where two redundant pass-through leaves can end up adjacent to each other but on different branches of the tree. To fix that, we need to either: * Allow adjacent interior nodes to 'steal' each others' children * Handle adjacent pass-through hunks in the PatchIterator
This prevents mergable leaves from going unmerged when they reside in separate adjacent subtrees
These will be used to group hunks that were created in the same transform invocation.
maxbrunsfeld
pushed a commit
that referenced
this pull request
May 22, 2015
Add Patch from text-document
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This contains all the commits from
text-documentthat related to the evolution of thePatchdata structure./cc @nathansobo