tags 468800 + upstream
retitle 468800 git-svn: convert show-ignore patterns to gitignore format
severity 468800 wishlist
thanks
Hi Matt,
Matt Kraai wrote:
> The show-ignore subcommand does not show the patterns from the
> global-ignores configuration variable (or from its default value if
> it's not set). This makes some files ignored by Subversion (e.g.,
> files ending with ".o") not ignored by Git.
The thing is, the global-ignores configuration is a personal thing,
while the svn:ignore property is repository policy. Each user might
customize global-ignores to include the filenames his or her favorite
text editor uses, and as a result
git svn show-ignore > .gitignore
would produce a file that is not appropriate for committing to a shared
git svn repository.
On the other hand, I do think it would be useful to be able to do
git svn show-ignore --global > ~/.gitexcludes
echo '[core] excludesfile = ~/.gitexcludes' >> ~/.gitconfig
or similar to set this appropriately.
Am I understanding correctly?
To implement this, it would be most useful to have a simple perl
script or a command to get the current value of the global-ignores
configuration variable. Here is the closest I get so far:
#!/usr/bin/perl
use strict;
use warnings;
use SVN::Client;
my $ctx = new SVN::Client;
my $config =
$ctx->config(SVN::Core::config_get_config(undef))->{config};
print $config;
Any pointers?
Thanks,
Jonathan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]