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.
I was looking for a reliable way to strip a directory based on its path, and this is a quick solution I came up with (since you said in #79 the proper built-in way would be hard to implement).
This simply adds a
--strip-trees-with-ids
option, based on what--strip-blobs-with-ids
does. You may prefer to merge both of these options into a single one, but I didn't want to break existing behavior.Here's how it's supposed to be used:
This is much more reliable than the solution in my previous comment here, since it only discards the subtrees, which means if any blob is also used in a different path you don't intent to delete, it won't be affected.
Please note that I absolutely don't know anything about Scala, and just hacked it together without really knowing what I was doing so please bear with me 😄