#468800 git svn show-ignore --global

#468800#5
Date:
2008-03-01 15:18:35 UTC
From:
To:
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.

See

http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2

for more information about it.

#468800#10
Date:
2010-02-12 23:56:18 UTC
From:
To:
tags 468800 + upstream
retitle 468800 git-svn: convert show-ignore patterns to gitignore format
severity 468800 wishlist
thanks

Hi Matt,

Matt Kraai wrote:

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