git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ilya Basin <basinilya@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>,
	Ray Chen <rchen@cs.umd.edu>, Eric Wong <normalperson@yhbt.net>
Subject: Re: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()
Date: Wed, 01 May 2013 10:09:59 -0700	[thread overview]
Message-ID: <7vhaim8w48.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1409591910.20130501123153@gmail.com> (Ilya Basin's message of "Wed, 1 May 2013 12:31:53 +0400")

Ilya Basin <basinilya@gmail.com> writes:

> IB> In my repo the placeholders change too often (in 1/4 commits). I'm
> IB> thinking of using:
> IB> 'git config --unset "svn-remote.$repo_id.added-placeholder" path_regex'
> IB> instead of full rewrite.
>
> I need your help. There are still problems:
>
>     $ grep "define MAX_MATCHES" ~/builds/git/git-git/config.c
>     #define MAX_MATCHES 8192
>
>     $ grep added-placeholder .git/config | wc -l
>     4430
>
> 1/4 commits change the list of placeholders, usually 1 folder changes.
> Clearing and re-adding the entries to the config takes ~1 minute.

While I agree both "git config"'s external interface and internal
implementation are not suited for bulk update, I have a suspicion
that the config mechanism is not the right place to store this
information in the first place.  The config is a per-Git-repository
state that is not versioned, which means it is applicable regardless
of individual commits or trees (also it means it is designed not to
be shared across repositories).  But "You may see a file here that
otherwise should not be there only to mark that there should be an
empty directory" is an attribute to a particular tree, isn't it?

If you have a branch that git-svn adds a placeholder file (hence you
want to annotate that tree with "This directory is there only to
hold the placeholder file") and you want to perform a merge on the
Git side of that branch with another Git branch that does have real
contents in that directory, you would want the result to say "This
directory no longer is just for a placeholder", but you cannot say
that globally by updating the config file, as the config mechanism
is also applied to the original branch that came from git-svn, in
which the directory in question is still only to hold the placeholder
file.

A Subversion-only history does not have a reason to have .gitignore
file tracked in it; wouldn't a cleaner implementation to consider a
directory that has .gitignore and nothing else marked with "added
placeholder", without (ab)using the config mechanism?  If you are
worried about a corner case where the Subversion side adds the file,
even though it is not used there, probably you can add a single
comment line "# added by git-svn only to keep the directory" and
consider a directory that has nothing but .gitignore that consists
of only that exact comment line an "added placeholder" directory to
work it around.  Either approach would tie the information to the
tree state, which sounds like a much more correct approach to the
"keep empty directory" problem to me.

  reply	other threads:[~2013-05-01 17:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01  5:09 [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list() Ilya Basin
2013-05-01  8:31 ` Re[2]: " Ilya Basin
2013-05-01 17:09   ` Junio C Hamano [this message]
2013-05-01 19:51     ` Ilya Basin
2013-05-01 21:30       ` Eric Wong
2013-05-01 21:53         ` Junio C Hamano
2013-05-02  2:49           ` Eric Wong
2013-05-02 17:31             ` Re[2]: " Ilya Basin
2013-05-02 20:40               ` Eric Wong
2013-05-03  5:26                 ` Re[2]: " Ilya Basin
2013-05-03  6:42                   ` Re[3]: " Ilya Basin
2013-05-06  8:14                     ` Re[4]: " Ilya Basin
2013-05-06  8:58               ` Re[3]: " Ilya Basin
2013-05-09  1:05                 ` Eric Wong
2013-05-28 12:57                 ` Re[4]: " Ilya Basin
2013-05-02 18:59             ` Ray Chen
2013-05-02  3:51         ` Re[2]: " Ilya Basin
2013-05-02 20:09           ` Eric Wong
  -- strict thread matches above, loose matches on Subject: below --
2013-04-30 17:37 Ilya Basin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vhaim8w48.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=basinilya@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --cc=rchen@cs.umd.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).