[racket-dev] proposal for moving to packages: repository

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu May 23 18:47:25 EDT 2013

At Thu, 23 May 2013 07:09:17 -0400, Eli Barzilay wrote:
> "Relevant history" is vague.

The history I want corresponds to `git log --follow' on each of the
files that end up in a repository.

> The thing that you can't do with
> filter-branch is keep the complete history if you remove files from
> the history -- the files that are gone go with their history.

That's true if you use `git filter-branch' in a particular way. I'll
suggest an alternative way, which involves filtering the set of files
in a commit-specific way. That is, the right set of files to keep for
each commit are not the ones in the final place, but the ones whose
history we need at each commit.


To make sure I'm not confused, I've implemented this idea. My
implementation is unlikely to be exactly right, yet, but I think it
works as a proof of concept.


The enclosed "slice.rkt" script takes a subdirectory and a destination
directory. Run it in the top directory of a git repository, and it
finds all the files in the given subdirectory, and then it closes over
the history of each file via `git log --follow'.

Posted on the dev mailing list.