Re: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ilya Basin <basinilya@xxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]