Message ID | pull.1766.v2.git.git.1723578946962.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] git-svn: mention `svn:global-ignores` 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: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". > 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 ... > { '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). > { '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? > { 'revision|r=i' => \$_revision > } ], > 'show-externals' => [ \&cmd_show_externals, "Show svn:externals listings", > > base-commit: cabe67c0d1819fd1e33079e92615c6c7a3dc560d Thanks.
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? Thanks, Alex
Alex Galvin <agalvin@comqi.com> writes: > 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.
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",