git-svn: Support svn:global-ignores property
PATCH 1/1 git-svn: Support svn:global-ignores property
--- Documentation/git-svn.txt | 12 ++++++------ git-svn.perl | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 20 deletions(-)
Documentation/git-svn.txt +6 -6
@@ -405,14 +405,14 @@ Any other arguments are passed directly to 'git log' independently of 'git svn' functions. 'create-ignore':: - Recursively finds the svn:ignore property on directories and - creates matching .gitignore files. The resulting files are staged to - be committed, but are not committed. Use -r/--revision to refer to a - specific revision. + Recursively finds svn:ignore and svn:global-ignores properties on + directories and creates matching .gitignore files. The resulting + files are staged to be committed, but are not committed. + Use -r/--revision to refer to a specific revision. 'show-ignore':: - Recursively finds and lists the svn:ignore property on - directories. The output is suitable for appending to + Recursively finds and lists svn:ignore and svn:global-ignores + properties on directories. The output is suitable for appending to the $GIT_DIR/info/exclude file. 'mkdirs'::
git-svn.perl +32 -14
66 lines not on this page · raw message
Signature · 1 line
1.8.3.msysgit.0
PATCH 1/1 git-svn: Support svn:global-ignores property
--- Documentation/git-svn.txt | 12 ++++++------ git-svn.perl | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 20 deletions(-)
Documentation/git-svn.txt +6 -6
@@ -405,14 +405,14 @@ Any other arguments are passed directly to 'git log' independently of 'git svn' functions. 'create-ignore':: - Recursively finds the svn:ignore property on directories and - creates matching .gitignore files. The resulting files are staged to - be committed, but are not committed. Use -r/--revision to refer to a - specific revision. + Recursively finds svn:ignore and svn:global-ignores properties on + directories and creates matching .gitignore files. The resulting + files are staged to be committed, but are not committed. + Use -r/--revision to refer to a specific revision. 'show-ignore':: - Recursively finds and lists the svn:ignore property on - directories. The output is suitable for appending to + Recursively finds and lists svn:ignore and svn:global-ignores + properties on directories. The output is suitable for appending to the $GIT_DIR/info/exclude file. 'mkdirs'::
git-svn.perl +32 -14
66 lines not on this page · raw message
Signature · 1 line
1.8.3.msysgit.0
Hi Aleksey
Thanks for your patch. I added Eric Wong to the Cc list; all git-svn patches should go to him.
Quoted 1 line · Aleksey Vasenev
---
Can you write a commit message? If you need a guideline for what to write there, consider this snippet from Documentation/SubmittingPatches:
The body should provide a meaningful commit message, which:
. explains the problem the change tries to solve, iow, what is wrong
with the current code without the change.
. justifies the way the change solves the problem, iow, why the
result with the change is better.
. alternate solutions considered but discarded, if any.
In particular, I'm curious about how global-ignores are different from ordinary ignores. After reading
http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.ignore.html
I don't understand why the above document speaks of a "config area" that holds the global-ignores configuration, while your patch seems to treat them as "just another property" set in the same way as existing svn:ignore. How does this work?
Quoted 3 lines
Documentation/git-svn.txt | 12 ++++++------ git-svn.perl | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 20 deletions(-)
Can you add a test or two?
Signature · 2 lines
Thomas Rast [email protected]
Quoted 1 line · Aleksey Vasenev
---
What Thomas said about commit messages.
Note: I hardly use git-svn or SVN anymore and don't pay attention to SVN changes.
Some style nitpicks:
git-svn.perl sub cmd_create_ignore { · line 1322
Quoted 7 lines
git-svn.perl +2
-1@@ -1304,16 +1318,20 @@ sub cmd_create_ignore { # which git won't track mkpath([$path]) unless -d $path; my $ignore = $path . '.gitignore'; - my $s = $props->{'svn:ignore'} or return; + my $s = &get_svn_ignore($props, 'svn:ignore'); + my $s_global = &get_svn_ignore($props, 'svn:global-ignores');
&sub(...) convention isn't consistent with the rest of our Perl code. Do this instead:
my $s = get_svn_ignore($props, 'svn:ignore'); my $s_global = get_svn_ignore($props, 'svn:global-ignores');
Review sub cmd_create_ignore { · line 1323
Quoted 1 line
(quoted diff) +1
-0+ $s or $s_global or return;
Precedence should be more explicit:
($s || $s_global) or return;
Likewise for cmd_show_ignore. Thanks.