Skip to content

Conversation

@studog-github
Copy link

This is a rough draft for a "blobbase" feature. It operates like git's interactive rebase but is not interactive. I'm not intending for this to be merged; just looking for comments on whether this could be merged. It would need test cases at least.

After running git-filter-repo --analyze, one annotates the resulting .git/filter-repo/analysis/blob-shas-and-paths.txt with commands and feeds that back in via git-filter-repo --blobbase. This avoids most of the human error inherent in a person transforming a blob-shas-and-paths.txt into a file that --strip-blobs-with-ids can handle.

The new process leaves the paths in place making blob selection easier.
It is a process that most git users will already be familiar with from rebase.

Unless the extra line in the blob-shas-and-paths.txt file causes issues, this is 100% backwards compatible.

I am currently using this to clean a repo that had a lot of build artifacts checked in. I find it better than (re-)creating a blob-sha-only file from blob-shas-and-paths.txt because I can see what I'm selecting and it's less transformation than making the blobs-only file.
Part of my equation is this lets me do the annotation slowly over time/many iterations while I figure out what needs to come out and what stays.

Original commit message:
Like interactive rebase for blobs

Like interactive rebase for blobs

Signed-off-by: Stuart MacDonald <stuartm.coding@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant