Repository navigation
Preserve excluded files during formatting and Git checkout - #50
Open
t-kalinowski wants to merge 61 commits into
Open
t-kalinowski wants to merge 61 commits into
t-kalinowski wants to merge 61 commits into
Conversation
This branch has not been deployed
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 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.
Git can check out a Markdown file before its
yamark.toml, or leave different versions of the config in the working tree and the index during a merge. Yamark could then rewrap an excluded file or reject its encoding. This change makes the experimental Git filter use the exclusions that belong to the content Git is checking out.Exclusions
Patterns use Git wildmatch, including literal braces, escaped characters and POSIX character classes. They match names relative to the config's directory, including when the config is a symlink. An excluded stdin path passes its bytes through even if its extension or encoding would otherwise be unsupported. Rust callers can again construct
FormatConfigwith..Default::default().Git filter
Smudge reads the nearest tracked config from the incoming tree. A nearer untracked config can supply personal settings for both
git addandgit restore. When Git omits the tree, Yamark uses the staged config if the blob matches the staged file and the config is resolved. During a merge or cherry-pick, Git can delay writing a different blob until it has checked out the config. Yamark then column-wraps included Markdown and preserves excluded bytes. If Git cannot identify the source or delay checkout, Yamark passes the bytes through. Clean reads settings from the working tree up to the repository root. Built-in conversions skip external embedded formatters, and setup leavesmerge.renormalizeunder repository control.The process driver negotiates clean and smudge independently, runs the default commands in process, and delegates custom drivers. It reuses checkout settings and refreshes them when the index changes.
adoptandjoinbatch conversions of regular staged files and preserve their working-tree permissions. Unix scratch directories are private. If the index changes during the final refresh, Yamark preserves the staged changes.git-filter checkverifies committed files using the attributes and exclusions inHEAD, including when the files are missing locally.