tytso at MIT.EDU
Wed Mar 19 10:06:33 CDT 2008
On Wed, Mar 19, 2008 at 10:00:32AM +0100, Adrian Buehlmann wrote:
> > convert will do this today.
> But this will invalidate a bunch of SHA-1 hashes, right? (Not just
> the obliterated ones).
> I was thinking about ways to not invalidate previously
> published hashes -- if that's possible.
You can't help invalidating all of the hashes *after* the fatal commit
containing the illegal material. But it is possible to keep all of
the hashes before the fatal commit. I would highly commend to people
the interface used by git:
What this allows you to do is to pass in a shell script fragment, like
git filter-branch --tree-filter 'rm -f drivers/sekrit_aacs_breaker.c' HEAD
This will remove the file "drivers/sekit_aacs_breaker.c" from all
commits in the repository. Of course, the hash for any commits which
end up getting modified by git-filter-branch will have new SHA-1 id's.
Ones before it will not.
It shouldn't be that hard for a Hg developer to code equivalent
functionality into Mercurial.
More information about the Mercurial