Message ID | pull.1766.git.git.1723500383989.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | git-svn: mention `svn:globalignores` in help+docs | expand |
"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: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. > @@ -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.
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.
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",