Re: exporting the last N days of a repository
- From
- Bob Hiestand <bob.hiestand@gmail.com>
- Date
- Nov 5, 2008, 19:49 UTC
- Message-ID
- <cc29171c0811051149qaf8b980s37c53cd48c481ab4@mail.gmail.com>
- In-Reply-To
- <93c3eada0811041954i24a15e33tcdd89f50c162b8d2@mail.gmail.com>
On Tue, Nov 4, 2008 at 9:54 PM, Geoff Russell <geoffrey.russell@gmail.com> wrote:
Show 14 quoted lines
> 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