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

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue May 21 03:09:49 EDT 2013

On Mon, May 20, 2013 at 6:07 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>
> To put it another way and overstate a little: I'm trying to get buy-in
> from dev to make the switch to packages wholesale. The little bit of
> staging in the plan is to make the conversion itself easier, and not to
> simplify the switch for developers.

Can you spell out how the directory movement you described will make
the conversion easier?

Here's what I think the simplest move to multiple repositories would be:

1. Use `git filter-branch` to create a new repository for the
"drracket" package from the current git repository. [1]
2-N. Repeat step 1 for all the other packages we plan to split out.
N+1. Use `git rm` to remove everything that's been split out from the
main repository.

I think the key piece of information that makes this work is that `git
filter-branch` lets you do the subdirectory manipulation that you seem
to be planning to do manually. In particular, see the last example in
the `git filter-branch` man page [2], which is about moving things to
a subdirectory.

For example, here's the `realm` collect split out, using `git
filter-branch` twice: https://github.com/samth/realm-split

The commands I used are here: https://gist.github.com/samth/5618014

[1] https://help.github.com/articles/splitting-a-subpath-out-into-a-new-repository
[2] https://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html

Sam

Posted on the dev mailing list.