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

Re: git fast-export | git fast-import doesn't work

From
Ondrej Certik <ondrej@certik.cz>
Date
Nov 25, 2008, 23:44 UTC
Message-ID
<85b5c3130811251544u5423c69p87c11241a2685f2f@mail.gmail.com>
In-Reply-To
<492C367D.3030209@drmicha.warpmail.net>

On Tue, Nov 25, 2008 at 6:31 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 56 quoted lines
> Ondrej Certik venit, vidit, dixit 25.11.2008 17:44:
>> Hi,
>>
>> I would like to export our whole git repository to patches, and then
>> reconstruct it again from scratch. Following the man page of "git
>> fast-export":
>>
>> $ git clone git://git.sympy.org/sympy-full-history-20081023.git
>> $ cd sympy-full-history-20081023
>> $ git fast-export --all --export-marks=marks > patches
>> $ cd ..
>> $ mkdir sympy-new
>> $ cd sympy-new
>> $ git init
>> $ git fast-import --export-marks=marks < ../sympy-full-history-20081023/patches
>> git-fast-import statistics:
>> ---------------------------------------------------------------------
>> Alloc'd objects:      25000
>> Total objects:        21355 (       144 duplicates                  )
>>       blobs  :         8009 (         0 duplicates       4529 deltas)
>>       trees  :        10627 (       144 duplicates       9189 deltas)
>>       commits:         2719 (         0 duplicates          0 deltas)
>>       tags   :            0 (         0 duplicates          0 deltas)
>> Total branches:          21 (        26 loads     )
>>       marks:        1048576 (     10728 unique    )
>>       atoms:            726
>> Memory total:          2880 KiB
>>        pools:          2098 KiB
>>      objects:           781 KiB
>> ---------------------------------------------------------------------
>> pack_report: getpagesize()            =       4096
>> pack_report: core.packedGitWindowSize =   33554432
>> pack_report: core.packedGitLimit      =  268435456
>> pack_report: pack_used_ctr            =      40706
>> pack_report: pack_mmap_calls          =       2791
>> pack_report: pack_open_windows        =          1 /          2
>> pack_report: pack_mapped              =   26177739 /   35513414
>> ---------------------------------------------------------------------
>>
>>
>>
>> However, the repository is very different to the original one. It
>> contains only 191 patches:
>>
>> $ git log --pretty=oneline | wc -l
>> 191
>>
>> and it only contains couple files. Compare this with the original repository:
>>
>> $ git log --pretty=oneline | wc -l
>> 2719
>
> I get the same stats (with the dups) but a perfect rev count, when I use
> git log --all. The reason is that the history in the imported repo is
> disconnected at various places (at tagging commits)! Your command counts
> only the revs backwards to the first "disconnection".
You are right! I didn't know about "git log --all".
>
> So, the real issue is: Why has the result these cuts in the history?

Yes, I would like to know this too. E.g. if it is a problem with our repository, or a problem in git, or whether it is just not supposed to work.

Show 6 quoted lines
> I don't know, I just noticed that turning on rename and copy detection
> makes git-fast-import crash, which shouldn't happen either. Something's
> not right here. CC'ing the authors of im- and export.
>
> BTW: Maybe you can accomplish what you want with different means? Why
> export|import directly to git?

I just answered this in my other email. Basically there are workarounds, but I would feel safe if I can (correctly) reconstruct the whole git repository from a human readable patches.

Ondrej
Previous: david@lang.hmNext: Peter Baumann
Message 6 of 25 in “git fast-export | git fast-import doesn't work”
  1. Ondrej CertikNov 25, 2008
  2. Michael J GruberNov 25, 2008
  3. Miklos VajnaNov 25, 2008
  4. Ondrej CertikNov 25, 2008
  5. david@lang.hmNov 25, 2008
  6. Ondrej CertikNov 25, 2008
  7. Peter BaumannNov 25, 2008
  8. Johannes SchindelinNov 26, 2008
  9. Ondrej CertikNov 26, 2008
  10. Ondrej CertikNov 26, 2008
  11. Michael J GruberNov 26, 2008
  12. Ondrej CertikNov 26, 2008
  13. Johannes SixtNov 26, 2008
  14. Ondrej CertikNov 27, 2008
  15. Ondrej CertikMay 3, 2009
  16. Johannes SchindelinNov 26, 2008
  17. Michael J GruberNov 26, 2008
  18. Johannes SchindelinNov 26, 2008
  19. Alexander GavrilovDec 7, 2008
  20. Johannes SchindelinDec 8, 2008
  21. Ondrej CertikNov 26, 2008
  22. Andreas EricssonNov 27, 2008
  23. Michael J GruberNov 26, 2008
  24. Johannes SchindelinNov 26, 2008
  25. Ondrej CertikNov 26, 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.