git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: exporting the last N days of a repository

From
BHBob 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
Previous: Geoff Russell
Message 8 of 8 in “exporting the last N days of a repository”
  1. Geoff RussellOct 29, 2008
  2. Johannes SchindelinOct 29, 2008
  3. Geoff RussellNov 3, 2008
  4. Johannes SchindelinNov 3, 2008
  5. Geoff RussellNov 4, 2008
  6. Bob HiestandNov 5, 2008
  7. Geoff RussellNov 5, 2008
  8. Bob HiestandNov 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.