threads / patch / 61936

patchgit-svn: mention `svn:globalignores` in help+docs

Subject: [PATCH] git-svn: mention `svn:globalignores` in help+docs

## tl;dr

9 messages between Aug 12, 2024 and Aug 14, 2024. Diffs are folded; open one to read it.

replies: 8people: 2as markdown or json

Alex Galvin via GitGitGadget· Aug 12, 2024, 22:06 UTC · lore
From: Alex Galvin <alex.v.galvin@gmail.com>

Git-SVN was previously taught to use the svn:globalignores attribute as well as svn:ignore when creating or showing .gitignore files from a Subversion repository. However, the documentation and help message still only mentioned svn:ignore. This commit updates Git-SVN's documentation and help command to mention the newly supported attribute.

Signed-off-by: Alex Galvin <alex.v.galvin@gmail.com>
---
    git-svn: mention svn:globalignores in help+docs
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1766%2Fav-gal%2Fgit-svn-doc-globalignores-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1766/av-gal/git-svn-doc-globalignores-v1
Pull-Request: https://github.com/git/git/pull/1766
 Documentation/git-svn.txt | 14 +++++++-------
 git-svn.perl              |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)
Show changes to 2 files +9 −9

Documentation/git-svn.txt, git-svn.perl

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 43c68c2ec44..af69b07caf0 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -431,14 +431,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 the svn:ignore and svn:globalignores 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 the svn:ignore and svn:globalignores
+	properties on directories. The output is suitable for appending to
 	the $GIT_DIR/info/exclude file.
 
 'mkdirs'::
@@ -871,7 +871,7 @@ Tracking and contributing to the trunk of a Subversion-managed project
 # Now commit your changes (that were committed previously using Git) to SVN,
 # as well as automatically updating your working HEAD:
 	git svn dcommit
-# Append svn:ignore settings to the default Git exclude file:
+# Append svn:ignore and svn:globalignores settings to the default Git exclude file:
 	git svn show-ignore >> .git/info/exclude
 ------------------------------------------------------------------------
 
diff --git a/git-svn.perl b/git-svn.perl
index a2a46608c9b..f3d8cf2c2c1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -219,7 +219,7 @@ my %cmd = (
 	                "Set an SVN repository to a git tree-ish",
 			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
 	'create-ignore' => [ \&cmd_create_ignore,
-			     'Create a .gitignore per svn:ignore',
+			     'Create a .gitignore per directory with svn:ignore and svn:globalignores',
 			     { 'revision|r=i' => \$_revision
 			     } ],
 	'mkdirs' => [ \&cmd_mkdirs ,
@@ -234,7 +234,7 @@ my %cmd = (
         'proplist' => [ \&cmd_proplist,
 		       'List all properties of a file or directory',
 		       { 'revision|r=i' => \$_revision } ],
-	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
+	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore and svn:globalignores listings",
 			{ 'revision|r=i' => \$_revision
 			} ],
 	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",

base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d
-- 
gitgitgadget
Junio C Hamano· Aug 13, 2024, 17:36 UTC · re: Alex Galvin via GitGitGadget · lore

Re: [PATCH] git-svn: mention `svn:globalignores` in help+docs

"Alex Galvin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 7 quoted lines
> From: Alex Galvin <alex.v.galvin@gmail.com>
>
> Git-SVN was previously taught to use the svn:globalignores attribute
> as well as svn:ignore when creating or showing .gitignore files from
> a Subversion repository. However, the documentation and help message
> still only mentioned svn:ignore. This commit updates Git-SVN's
> documentation and help command to mention the newly supported attribute.
Thanks for tying these loose ends.  Very much appreciated.
Show 6 quoted lines
> @@ -219,7 +219,7 @@ my %cmd = (
>  	                "Set an SVN repository to a git tree-ish",
>  			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>  	'create-ignore' => [ \&cmd_create_ignore,
> -			     'Create a .gitignore per svn:ignore',
> +			     'Create a .gitignore per directory with svn:ignore and svn:globalignores',

I do not know how likely it is that Subversion gains even more sources of exclusion data in the future, but it makes me wonder if a phrase like "Create a .gitignore file from ignore properties of svn" so that we do not have to muck with the message. Presumably those who do use this feature know which properties Subversion uses to record the ignored paths. On the other hand, if it is not expected to happen very soon, I think the text in this patch is good enough, and we can revisit the issue of help text getting overly long when we do need to add the third one.

The same comment applies to the runtime option help for the other one. I think listing the set of ignore properties we are aware of, iow what you have in this patch, is perfectly appropriate for the documentation.

Thanks.
Alex Galvin· Aug 13, 2024, 19:05 UTC · re: Junio C Hamano · lore

Re: [PATCH] git-svn: mention `svn:globalignores` in help+docs

On 2024-08-13 1:36 p.m., Junio C Hamano wrote:
> I do not know how likely it is that Subversion gains even more
> sources of exclusion data in the future, but it makes me wonder if a
> phrase like "Create a .gitignore file from ignore properties of svn"
> so that we do not have to muck with the message.

I don't think that Subversion will add another attribute for ignored files anytime soon. The project has not had a minor release since 2020; the svn:global-ignores actually dates back to Subversion 1.8 in 2013.

With that being said, I think your proposed message is still better. I spent entirely too long debating if it was more appropriate to use "and" or "or" in my version of the help text.

Alex Galvin via GitGitGadget· Aug 13, 2024, 19:55 UTC · re: Alex Galvin via GitGitGadget · lore

[PATCH v2] git-svn: mention `svn:global-ignores` in help+docs

From: Alex Galvin <alex.v.galvin@gmail.com>

Git-SVN was previously taught to use the svn:global-ignores attribute as well as svn:ignore when creating or showing .gitignore files from a Subversion repository. However, the documentation and help message still only mentioned svn:ignore. This commit updates Git-SVN's documentation and help command to mention support for the new attribute.

Signed-off-by: Alex Galvin <agalvin@comqi.com>
---
    git-svn: mention svn:global-ignores in help+docs
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1766%2Fav-gal%2Fgit-svn-doc-globalignores-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1766/av-gal/git-svn-doc-globalignores-v2
Pull-Request: https://github.com/git/git/pull/1766
Range-diff vs v1:
 1:  9850e80684f ! 1:  d0b5df150e9 git-svn: mention `svn:globalignores` in help+docs
     @@ Metadata
      Author: Alex Galvin <alex.v.galvin@gmail.com>
      
       ## Commit message ##
     -    git-svn: mention `svn:globalignores` in help+docs
     +    git-svn: mention `svn:global-ignores` in help+docs
      
     -    Git-SVN was previously taught to use the svn:globalignores attribute
     -    as well as svn:ignore when creating or showing .gitignore files from
     -    a Subversion repository. However, the documentation and help message
     +    Git-SVN was previously taught to use the svn:global-ignores attribute
     +    as well as svn:ignore when creating or showing .gitignore files from a
     +    Subversion repository. However, the documentation and help message
          still only mentioned svn:ignore. This commit updates Git-SVN's
     -    documentation and help command to mention the newly supported attribute.
     +    documentation and help command to mention support for the new attribute.
      
     -    Signed-off-by: Alex Galvin <alex.v.galvin@gmail.com>
     +    Signed-off-by: Alex Galvin <agalvin@comqi.com>
      
       ## Documentation/git-svn.txt ##
      @@ Documentation/git-svn.txt: Any other arguments are passed directly to 'git log'
     @@ Documentation/git-svn.txt: Any other arguments are passed directly to 'git log'
      -	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 the svn:ignore and svn:globalignores properties on
     -+	directories and creates matching .gitignore files. The resulting
     ++	Recursively finds the 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 the svn:ignore and svn:globalignores
     ++	Recursively finds and lists the svn:ignore and svn:global-ignores
      +	properties on directories. The output is suitable for appending to
       	the $GIT_DIR/info/exclude file.
       
     @@ Documentation/git-svn.txt: Tracking and contributing to the trunk of a Subversio
       # as well as automatically updating your working HEAD:
       	git svn dcommit
      -# Append svn:ignore settings to the default Git exclude file:
     -+# Append svn:ignore and svn:globalignores settings to the default Git exclude file:
     ++# Append svn:ignore and svn:global-ignores settings to the default Git exclude file:
       	git svn show-ignore >> .git/info/exclude
       ------------------------------------------------------------------------
       
     @@ git-svn.perl: my %cmd = (
       			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
       	'create-ignore' => [ \&cmd_create_ignore,
      -			     'Create a .gitignore per svn:ignore',
     -+			     'Create a .gitignore per directory with svn:ignore and svn:globalignores',
     ++			     "Create a .gitignore per directory with an SVN ignore property",
       			     { 'revision|r=i' => \$_revision
       			     } ],
       	'mkdirs' => [ \&cmd_mkdirs ,
     +-	              "recreate empty directories after a checkout",
     ++	              "Recreate empty directories after a checkout",
     + 	              { 'revision|r=i' => \$_revision } ],
     +         'propget' => [ \&cmd_propget,
     + 		       'Print the value of a property on a file or directory',
      @@ git-svn.perl: my %cmd = (
               'proplist' => [ \&cmd_proplist,
       		       'List all properties of a file or directory',
       		       { 'revision|r=i' => \$_revision } ],
      -	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
     -+	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore and svn:globalignores listings",
     ++	'show-ignore' => [ \&cmd_show_ignore, "Show .gitignore patterns from SVN ignore properties",
       			{ 'revision|r=i' => \$_revision
       			} ],
       	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",
 Documentation/git-svn.txt | 14 +++++++-------
 git-svn.perl              |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)
Show changes to 2 files +10 −10

Documentation/git-svn.txt, git-svn.perl

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 43c68c2ec44..bcf7d84a87d 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -431,14 +431,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 the 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 the svn:ignore and svn:global-ignores
+	properties on directories. The output is suitable for appending to
 	the $GIT_DIR/info/exclude file.
 
 'mkdirs'::
@@ -871,7 +871,7 @@ Tracking and contributing to the trunk of a Subversion-managed project
 # Now commit your changes (that were committed previously using Git) to SVN,
 # as well as automatically updating your working HEAD:
 	git svn dcommit
-# Append svn:ignore settings to the default Git exclude file:
+# Append svn:ignore and svn:global-ignores settings to the default Git exclude file:
 	git svn show-ignore >> .git/info/exclude
 ------------------------------------------------------------------------
 
diff --git a/git-svn.perl b/git-svn.perl
index a2a46608c9b..d8dc485e50d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -219,11 +219,11 @@ my %cmd = (
 	                "Set an SVN repository to a git tree-ish",
 			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
 	'create-ignore' => [ \&cmd_create_ignore,
-			     'Create a .gitignore per svn:ignore',
+			     "Create a .gitignore per directory with an SVN ignore property",
 			     { 'revision|r=i' => \$_revision
 			     } ],
 	'mkdirs' => [ \&cmd_mkdirs ,
-	              "recreate empty directories after a checkout",
+	              "Recreate empty directories after a checkout",
 	              { 'revision|r=i' => \$_revision } ],
         'propget' => [ \&cmd_propget,
 		       'Print the value of a property on a file or directory',
@@ -234,7 +234,7 @@ my %cmd = (
         'proplist' => [ \&cmd_proplist,
 		       'List all properties of a file or directory',
 		       { 'revision|r=i' => \$_revision } ],
-	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
+	'show-ignore' => [ \&cmd_show_ignore, "Show .gitignore patterns from SVN ignore properties",
 			{ 'revision|r=i' => \$_revision
 			} ],
 	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",

base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d
-- 
gitgitgadget
Junio C Hamano· Aug 13, 2024, 22:33 UTC · re: Alex Galvin via GitGitGadget · lore

Re: [PATCH v2] git-svn: mention `svn:global-ignores` in help+docs

"Alex Galvin via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Alex Galvin <alex.v.galvin@gmail.com>
>
> Git-SVN was previously taught to use the svn:global-ignores attribute
I think the noun they use is not "attribute" but "property".
> as well as svn:ignore when creating or showing .gitignore files from a
> Subversion repository. However, the documentation and help message
> still only mentioned svn:ignore. This commit updates Git-SVN's
"This commit updates" -> "Update".
Show 10 quoted lines
> diff --git a/git-svn.perl b/git-svn.perl
> index a2a46608c9b..d8dc485e50d 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -219,11 +219,11 @@ my %cmd = (
>  	                "Set an SVN repository to a git tree-ish",
>  			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>  	'create-ignore' => [ \&cmd_create_ignore,
> -			     'Create a .gitignore per svn:ignore',
> +			     "Create a .gitignore per directory with an SVN ignore property",

Hmph. Is it intentional that this "create" side uses a single property while ...

Show 5 quoted lines
>  			     { 'revision|r=i' => \$_revision
>  			     } ],
>  	'mkdirs' => [ \&cmd_mkdirs ,
> -	              "recreate empty directories after a checkout",
> +	              "Recreate empty directories after a checkout",

Given that all other messages begin with capitalized verb, this is a good change for consistency, but it was not advertised in the proposed log message (just saying "While at it, capitalize the help message for 'mkdirs' command. for consistency" would be sufficient).

Show 9 quoted lines
>  	              { 'revision|r=i' => \$_revision } ],
>          'propget' => [ \&cmd_propget,
>  		       'Print the value of a property on a file or directory',
> @@ -234,7 +234,7 @@ my %cmd = (
>          'proplist' => [ \&cmd_proplist,
>  		       'List all properties of a file or directory',
>  		       { 'revision|r=i' => \$_revision } ],
> -	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
> +	'show-ignore' => [ \&cmd_show_ignore, "Show .gitignore patterns from SVN ignore properties",

... the other "show" side talks about "ignore properties" (plural), implying that both svn:ignore and svn:global-ignores may get involved?

Show 5 quoted lines
>  			{ 'revision|r=i' => \$_revision
>  			} ],
>  	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",
>
> base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d
Thanks.
Alex Galvin· Aug 14, 2024, 17:53 UTC · re: Junio C Hamano · lore

Re: [PATCH v2] git-svn: mention `svn:global-ignores` in help+docs

On 2024-08-13 6:33 p.m., Junio C Hamano wrote:
Show 15 quoted lines
>> diff --git a/git-svn.perl b/git-svn.perl
>> index a2a46608c9b..d8dc485e50d 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -219,11 +219,11 @@ my %cmd = (
>>   	                "Set an SVN repository to a git tree-ish",
>>   			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>>   	'create-ignore' => [ \&cmd_create_ignore,
>> -			     'Create a .gitignore persvn:ignore',
>> +			     "Create a .gitignore per directory with an SVN ignore property",
> Hmph.  Is it intentional that this "create" side uses a single
> property while ...
> ... the other "show" side talks about "ignore properties" (plural),
> implying that both svn:ignore and svn:global-ignores may get
> involved?

I was trying to be precise that the create command makes one .gitignore file in each directory it visits, regardless if that directory only has one of the attributes or both. Would using "any SVN ignore property" instead of "a SVN ignore property" make this clear?

Thanks, Alex

Junio C Hamano· Aug 14, 2024, 18:55 UTC · re: Alex Galvin · lore

Re: [PATCH v2] git-svn: mention `svn:global-ignores` in help+docs

Alex Galvin <agalvin@comqi.com> writes:
Show 21 quoted lines
> On 2024-08-13 6:33 p.m., Junio C Hamano wrote:
>>> diff --git a/git-svn.perl b/git-svn.perl
>>> index a2a46608c9b..d8dc485e50d 100755
>>> --- a/git-svn.perl
>>> +++ b/git-svn.perl
>>> @@ -219,11 +219,11 @@ my %cmd = (
>>>   	                "Set an SVN repository to a git tree-ish",
>>>   			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>>>   	'create-ignore' => [ \&cmd_create_ignore,
>>> -			     'Create a .gitignore persvn:ignore',
>>> +			     "Create a .gitignore per directory with an SVN ignore property",
>> Hmph.  Is it intentional that this "create" side uses a single
>> property while ...
>> ... the other "show" side talks about "ignore properties" (plural),
>> implying that both svn:ignore and svn:global-ignores may get
>> involved?
>
> I was trying to be precise that the create command makes one .gitignore
> file in each directory it visits, regardless if that directory only has
> one of the attributes or both. Would using "any SVN ignore property"
> instead of "a SVN ignore property" make this clear?

You are creating a .gitignore file per each directory that has some "ignore" properties on the subversion side, so I do not have any trouble with "_a_ .gitignore" being singular in the description.

And you anticipate that each such directory has one or more [*] svn:ignore or svn:global-ignores properties attached to it, and that was why my reading hiccuped after seeing "with _an_ SVN ignore property".

    Side note: * if there is 0 such properties given to the
    directory, you obviously do not muck with .gitignore file in the
    directory.

So I am not sure how much difference "any/a" before "SVN ignore property" makes.

Thanks.
Alex Galvin via GitGitGadget· Aug 14, 2024, 20:03 UTC · re: Alex Galvin via GitGitGadget · lore

[PATCH v3] git-svn: mention `svn:global-ignores` in help+docs

From: Alex Galvin <agalvin@comqi.com>

Git-SVN was previously taught to use the svn:global-ignores property as well as svn:ignore when creating or showing .gitignore files from a Subversion repository. However, the documentation and help message still only mentioned svn:ignore. Update Git-SVN's documentation and help command to mention support for the new property. Also capitalize the help message for the 'mkdirs' command, for consistency.

Signed-off-by: Alex Galvin <agalvin@comqi.com>
---
    git-svn: mention svn:global-ignores in help+docs
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1766%2Fav-gal%2Fgit-svn-doc-globalignores-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1766/av-gal/git-svn-doc-globalignores-v3
Pull-Request: https://github.com/git/git/pull/1766
Range-diff vs v2:
 1:  d0b5df150e9 ! 1:  a6d93512218 git-svn: mention `svn:global-ignores` in help+docs
     @@
       ## Metadata ##
     -Author: Alex Galvin <alex.v.galvin@gmail.com>
     +Author: Alex Galvin <agalvin@comqi.com>
      
       ## Commit message ##
          git-svn: mention `svn:global-ignores` in help+docs
      
     -    Git-SVN was previously taught to use the svn:global-ignores attribute
     -    as well as svn:ignore when creating or showing .gitignore files from a
     -    Subversion repository. However, the documentation and help message
     -    still only mentioned svn:ignore. This commit updates Git-SVN's
     -    documentation and help command to mention support for the new attribute.
     +    Git-SVN was previously taught to use the svn:global-ignores property as
     +    well as svn:ignore when creating or showing .gitignore files from a
     +    Subversion repository. However, the documentation and help message still
     +    only mentioned svn:ignore. Update Git-SVN's documentation and help
     +    command to mention support for the new property. Also capitalize the
     +    help message for the 'mkdirs' command, for consistency.
      
          Signed-off-by: Alex Galvin <agalvin@comqi.com>
      
     @@ git-svn.perl: my %cmd = (
       			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
       	'create-ignore' => [ \&cmd_create_ignore,
      -			     'Create a .gitignore per svn:ignore',
     -+			     "Create a .gitignore per directory with an SVN ignore property",
     ++			     "Create a .gitignore per directory with SVN ignore properties",
       			     { 'revision|r=i' => \$_revision
       			     } ],
       	'mkdirs' => [ \&cmd_mkdirs ,
 Documentation/git-svn.txt | 14 +++++++-------
 git-svn.perl              |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)
Show changes to 2 files +10 −10

Documentation/git-svn.txt, git-svn.perl

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 43c68c2ec44..bcf7d84a87d 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -431,14 +431,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 the 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 the svn:ignore and svn:global-ignores
+	properties on directories. The output is suitable for appending to
 	the $GIT_DIR/info/exclude file.
 
 'mkdirs'::
@@ -871,7 +871,7 @@ Tracking and contributing to the trunk of a Subversion-managed project
 # Now commit your changes (that were committed previously using Git) to SVN,
 # as well as automatically updating your working HEAD:
 	git svn dcommit
-# Append svn:ignore settings to the default Git exclude file:
+# Append svn:ignore and svn:global-ignores settings to the default Git exclude file:
 	git svn show-ignore >> .git/info/exclude
 ------------------------------------------------------------------------
 
diff --git a/git-svn.perl b/git-svn.perl
index a2a46608c9b..01e7a70de1c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -219,11 +219,11 @@ my %cmd = (
 	                "Set an SVN repository to a git tree-ish",
 			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
 	'create-ignore' => [ \&cmd_create_ignore,
-			     'Create a .gitignore per svn:ignore',
+			     "Create a .gitignore per directory with SVN ignore properties",
 			     { 'revision|r=i' => \$_revision
 			     } ],
 	'mkdirs' => [ \&cmd_mkdirs ,
-	              "recreate empty directories after a checkout",
+	              "Recreate empty directories after a checkout",
 	              { 'revision|r=i' => \$_revision } ],
         'propget' => [ \&cmd_propget,
 		       'Print the value of a property on a file or directory',
@@ -234,7 +234,7 @@ my %cmd = (
         'proplist' => [ \&cmd_proplist,
 		       'List all properties of a file or directory',
 		       { 'revision|r=i' => \$_revision } ],
-	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
+	'show-ignore' => [ \&cmd_show_ignore, "Show .gitignore patterns from SVN ignore properties",
 			{ 'revision|r=i' => \$_revision
 			} ],
 	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",

base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d
-- 
gitgitgadget
Junio C Hamano· Aug 14, 2024, 22:12 UTC · re: Alex Galvin via GitGitGadget · lore

Re: [PATCH v3] git-svn: mention `svn:global-ignores` in help+docs

"Alex Galvin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 12 quoted lines
> From: Alex Galvin <agalvin@comqi.com>
>
> Git-SVN was previously taught to use the svn:global-ignores property as
> well as svn:ignore when creating or showing .gitignore files from a
> Subversion repository. However, the documentation and help message still
> only mentioned svn:ignore. Update Git-SVN's documentation and help
> command to mention support for the new property. Also capitalize the
> help message for the 'mkdirs' command, for consistency.
>
> Signed-off-by: Alex Galvin <agalvin@comqi.com>
> ---
>     git-svn: mention svn:global-ignores in help+docs

Well written. Also thanks for forcing the authorship with the additional in-body From: header. I totally missed it while reading the last round.

Will queue.  Let's mark it for 'next' soonish.
Show 107 quoted lines
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1766%2Fav-gal%2Fgit-svn-doc-globalignores-v3
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1766/av-gal/git-svn-doc-globalignores-v3
> Pull-Request: https://github.com/git/git/pull/1766
>
> Range-diff vs v2:
>
>  1:  d0b5df150e9 ! 1:  a6d93512218 git-svn: mention `svn:global-ignores` in help+docs
>      @@
>        ## Metadata ##
>      -Author: Alex Galvin <alex.v.galvin@gmail.com>
>      +Author: Alex Galvin <agalvin@comqi.com>
>       
>        ## Commit message ##
>           git-svn: mention `svn:global-ignores` in help+docs
>       
>      -    Git-SVN was previously taught to use the svn:global-ignores attribute
>      -    as well as svn:ignore when creating or showing .gitignore files from a
>      -    Subversion repository. However, the documentation and help message
>      -    still only mentioned svn:ignore. This commit updates Git-SVN's
>      -    documentation and help command to mention support for the new attribute.
>      +    Git-SVN was previously taught to use the svn:global-ignores property as
>      +    well as svn:ignore when creating or showing .gitignore files from a
>      +    Subversion repository. However, the documentation and help message still
>      +    only mentioned svn:ignore. Update Git-SVN's documentation and help
>      +    command to mention support for the new property. Also capitalize the
>      +    help message for the 'mkdirs' command, for consistency.
>       
>           Signed-off-by: Alex Galvin <agalvin@comqi.com>
>       
>      @@ git-svn.perl: my %cmd = (
>        			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>        	'create-ignore' => [ \&cmd_create_ignore,
>       -			     'Create a .gitignore per svn:ignore',
>      -+			     "Create a .gitignore per directory with an SVN ignore property",
>      ++			     "Create a .gitignore per directory with SVN ignore properties",
>        			     { 'revision|r=i' => \$_revision
>        			     } ],
>        	'mkdirs' => [ \&cmd_mkdirs ,
>
>
>  Documentation/git-svn.txt | 14 +++++++-------
>  git-svn.perl              |  6 +++---
>  2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index 43c68c2ec44..bcf7d84a87d 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -431,14 +431,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 the 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 the svn:ignore and svn:global-ignores
> +	properties on directories. The output is suitable for appending to
>  	the $GIT_DIR/info/exclude file.
>  
>  'mkdirs'::
> @@ -871,7 +871,7 @@ Tracking and contributing to the trunk of a Subversion-managed project
>  # Now commit your changes (that were committed previously using Git) to SVN,
>  # as well as automatically updating your working HEAD:
>  	git svn dcommit
> -# Append svn:ignore settings to the default Git exclude file:
> +# Append svn:ignore and svn:global-ignores settings to the default Git exclude file:
>  	git svn show-ignore >> .git/info/exclude
>  ------------------------------------------------------------------------
>  
> diff --git a/git-svn.perl b/git-svn.perl
> index a2a46608c9b..01e7a70de1c 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -219,11 +219,11 @@ my %cmd = (
>  	                "Set an SVN repository to a git tree-ish",
>  			{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
>  	'create-ignore' => [ \&cmd_create_ignore,
> -			     'Create a .gitignore per svn:ignore',
> +			     "Create a .gitignore per directory with SVN ignore properties",
>  			     { 'revision|r=i' => \$_revision
>  			     } ],
>  	'mkdirs' => [ \&cmd_mkdirs ,
> -	              "recreate empty directories after a checkout",
> +	              "Recreate empty directories after a checkout",
>  	              { 'revision|r=i' => \$_revision } ],
>          'propget' => [ \&cmd_propget,
>  		       'Print the value of a property on a file or directory',
> @@ -234,7 +234,7 @@ my %cmd = (
>          'proplist' => [ \&cmd_proplist,
>  		       'List all properties of a file or directory',
>  		       { 'revision|r=i' => \$_revision } ],
> -	'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
> +	'show-ignore' => [ \&cmd_show_ignore, "Show .gitignore patterns from SVN ignore properties",
>  			{ 'revision|r=i' => \$_revision
>  			} ],
>  	'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings",
>
> base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d

← back to recent threads