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

Re: [PATCH] git-svn: allow disabling expensive broken symlink checks

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 3, 2009, 04:45 UTC
Message-ID
<20090203044549.GA2483@dcvr.yhbt.net>
In-Reply-To
<7vbptlo7zg.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > Since dbc6c74d0858d77e61e092a48d467e725211f8e9, git-svn has had
> > an expensive check for broken symlinks that exist in some
> > repositories.  This leads to a heavy performance hit on
> > repositories with many empty blobs that are not supposed to be
> > symlinks.
> >
> > The workaround is enabled by default; and may be disabled via:
> >
> >   git config svn.brokenSymlinkWorkaround false
> >
> > Reported by Markus Heidelberg.
> >
> > Signed-off-by: Eric Wong <normalperson@yhbt.net>
> 
> How common is this breakage in people's subversion repositories that
> dbc6c74d (git-svn: handle empty files marked as symlinks in SVN,
> 2009-01-11) works around?

It's not common at all. Some broken Windows clients were able to create it.

Show 5 quoted lines
> What's the way to recover from a broken import, when the subversion
> repository does have such a breakage, and the user used git-svn that
> predates dbc6c74?  Is it very involved, and it is much better to have the
> safety by default than to force everybody else who interacts with
> non-broken subversion repository suffer from this performance penalty?

Previously, git-svn would just stop importing and refuse to continue. So allowing the user to enable it would be a problem; too. I don't recall the error being easy to distinguish from other errors.

> Because the fix (that is broken from the performance angle) is relatively
> recent, I am wondering if it makes more sense to turn it off by default,
> and allow people with such a broken history to optionally turn it on.

I'm considering disabling it by default, too. It only gets triggered if there are any empty blobs at all in the repository (which are fairly rare, but not as rare as broken symlinks in SVN). So for a "normal" repository it would just be the (low) overhead of calling ls-files for every revision we fetch (and the hash-object </dev/null, which could even be hard-coded).

Perhaps just having a "try enabling this ..." type option on any fetch failure would be better...

-- 
Eric Wong
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 11 in “"git svn fetch" slow”
  1. Markus HeidelbergJan 31, 2009
  2. Sverre RabbelierJan 31, 2009
  3. Markus HeidelbergJan 31, 2009
  4. Sverre RabbelierJan 31, 2009
  5. git-svn: allow disabling expensive broken symlink checksEric Wong, Feb 1, 2009
  6. Junio C HamanoFeb 2, 2009
  7. Eric WongFeb 3, 2009
  8. Junio C HamanoFeb 3, 2009
  9. Eric WongFeb 3, 2009
  10. Eric WongFeb 5, 2009
  11. Junio C HamanoFeb 5, 2009

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.