Martin Storsjö martin@martin.st writes:
The author mapping looks good to me at least, looking forward to the final repo (including separated nettle)! Thanks for your work on this!
I now have a first nettle test repo at git://git.lysator.liu.se/lsh-test/nettle-test.git
It was created by first cloning the lsh repository, all branches. Then
git filter-branch --subdirectory-filter nettle --prune-empty -- --all
followed by git update-ref -d on all refs which the previous command warned about being unchanged. Including branches other than master is probably overkill. One file (nettle/tools/nettle-lfib-stream.c) seems to have originated on the lsh-1.4.2 branch, but I think it was copied manually to the main trunk.
However, this conversion loses quite a lot of history, including all nettle-1.15 releases. To actually build old versions, one would need to use the lsh repo (due to the shared files linked by lsh's ./.bootstrap), but it would be nice to still have the history in the nettle repo.
I think the following approach would make some sense, using git filter-branch --tree-filter or possibly --index-filter:
1. Delete everything except nettle, src/nettle and src/symmetric.
2. If nettle exists, move its contents up one level and delete nettle.
3. Otherwise, if src/nettle exists (and is non-empty), move its contents up two levels and delete the original directory.
4. Otherwise, if src/symmetric exists (and is non-empty), move its contents up two levels and delete the original directory.
5. Otherwise, the tree should be empty. It's from the first few weeks of lsh development, not relevant to nettle.
Help from any git guru on the list is appreciated. In particular if the more efficient --index-filter method is to be used, it's not obvious to me how to examine the index and do the right tests and deletions.
One could also try to extract all src/symmetric ChangeLog entries from lsh's ChangeLog and copy to nettle's (prior to spring 2001 or so) . But I think that can be done after the git migration; it's not much use to modify earlier revisions of the ChangeLog.
Regards, /nisse