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

Re: [BUG] Symbolic links break "git fast-export"?

From
Elijah Newren <newren@gmail.com>
Date
Jun 24, 2019, 12:55 UTC
Message-ID
<CABPp-BFLJ48BZ97Y9mr4i3q7HMqjq18cXMgSYdxqD1cMzH8Spg@mail.gmail.com>
In-Reply-To
<95EF0665-9882-4707-BB6A-94182C01BE91@gmail.com>
On Mon, Jun 24, 2019 at 5:05 AM Lars Schneider <larsxschneider@gmail.com> wrote:
Show 5 quoted lines
>
> Hi folks,
>
> Is my understanding correct, that `git fast-export | git fast-import`
> should not modify the repository?
I forgot to respond to this part.  The answer is mostly yes, but actually no:
* fast-export strips any extended commit headers, if any (it only
looks for expected headers and handles those)
* fast-export omits any tags of trees
* fast-export sometimes rewrites tags of tags of commits to tags of
commits (depends on options passed; it either mistakenly does this, or
dies with an error)
* fast-export defaults to re-encoding commits to be in UTF-8, with no
option in git <= 2.22.0 to leave the encoding alone
* annotated tags outside of the refs/tags/ namespace will have their
location mangled
* references that include commit cycles in their history (which can be
created with git-replace(1)) will not be flagged to the user as an
error but will be silently deleted by fast-export as though the branch
or tag contained no interesting files
* fast-export or fast-import may die on some repositories (e.g. if
there are tags of blobs, if there are signed tags and no
--signed-tags= option passed, if a commit has improperly formatted
info such as a timezone with more than four digits (which exist in the
wild, e.g. in the rails repo, and google will find you more), or in
latest git master if the commit has a recorded encoding and no
--reencode option is passed)
* ...and the bug you just found.

It's a valid question whether these are bugs or not; I'd say that some definitely are, but not all. I had to document all of these up at https://github.com/newren/git-filter-repo#inherited-limitations, among one or two others based on the options I default to passing to fast-export.

Hope that helps, Elijah

Previous: Elijah Newren
Message 9 of 9 in “[BUG] Symbolic links break "git fast-export"?”
  1. Lars SchneiderJun 24, 2019
  2. Elijah NewrenJun 24, 2019
  3. Jeff KingJun 24, 2019
  4. Lars SchneiderJun 30, 2019
  5. Johannes SixtJun 30, 2019
  6. Elijah NewrenJul 1, 2019
  7. Lars SchneiderJun 30, 2019
  8. Elijah NewrenJul 1, 2019
  9. Elijah NewrenJun 24, 2019

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.