Re: exporting the last N days of a repository
From: Bob Hiestand <hidden>
Date: 2016-06-15 22:45:36
On Tue, Nov 4, 2008 at 9:54 PM, Geoff Russell [off-list ref] wrote:
Thanks Bob but when I ran your version (using master@{15} instead of
--since =...) it
effectively dropped the recent history, not the old history. Imagine a sequence
of 30 commits, no branches. I want to keep, for example, 15 through
30 and dump 1
to 15. So I need to have the working directory as at commit 15 and
then all the changes
to bring it up to 30.
... 11--12--13--14--15 ... 28--29--30
... Dump 1 to 15 keep 15 to 30.
Your script kept 1 to 15 and dumped the rest.I guess that's because you're using reflog syntax and pulling up a commit that isn't on the current branch, due to rebasing, resetting, or any such activity. Using the reflog syntax, for the few commits I tried, produced the desired result. I'm not sure why you'd use reflogs, however, as I believe the --max-age or --since parameters to rev-list seem to be more in line with your request. Actually, I'd be surprised if you couldn't identify the one commit that you wanted to use and use it directly; the rev-list was just to show an example. Thank you, bob