git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] svn: Create config options for common args
@ 2011-11-14 20:25 Ted Percival
  2011-11-14 21:46 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Ted Percival @ 2011-11-14 20:25 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, Ted Percival

These config options may be set to apply to all commands on the
repository in lieu of providing the command-line options each time:
  svn.localtime: --localtime
  svn.useLogAuthor: --use-log-author
  svn.addAuthorFrom: --add-author-from

Since these flags apply to multiple operations, it's easier to set them
once rather than remembering to use them every time for every operation.

Signed-off-by: Ted Percival <ted.percival@quest.com>
---
 Documentation/git-svn.txt |   10 ++++++++++
 git-svn.perl              |    3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 34ee785..20f8edd 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -113,6 +113,9 @@ repository you cloned from, but if you wish for your local Git
 repository to be able to interoperate with someone else's local Git
 repository, either don't use this option or you should both use it in
 the same local timezone.
++
+[verse]
+config key: svn.localtime
 
 --parent;;
 	Fetch only from the SVN parent of the current HEAD.
@@ -596,12 +599,19 @@ creating the branch or tag.
 	When retrieving svn commits into git (as part of 'fetch', 'rebase', or
 	'dcommit' operations), look for the first `From:` or `Signed-off-by:` line
 	in the log message and use that as the author string.
++
+[verse]
+config key: svn.useLogAuthor
+
 --add-author-from::
 	When committing to svn from git (as part of 'commit-diff', 'set-tree' or 'dcommit'
 	operations), if the existing log message doesn't already have a
 	`From:` or `Signed-off-by:` line, append a `From:` line based on the
 	git commit's author string.  If you use this, then `--use-log-author`
 	will retrieve a valid author string for all commits.
++
+[verse]
+config key: svn.addAuthorFrom
 
 
 ADVANCED OPTIONS
diff --git a/git-svn.perl b/git-svn.perl
index e30df22..d69b0d7 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -21,6 +21,9 @@ $Git::SVN::default_repo_id = 'svn';
 $Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
 $Git::SVN::Ra::_log_window_size = 100;
 $Git::SVN::_minimize_url = 'unset';
+$Git::SVN::_localtime = Git::config_bool('svn.localtime');
+$Git::SVN::_add_author_from = Git::config_bool('svn.addAuthorFrom');
+$Git::SVN::_use_log_author = Git::config_bool('svn.useLogAuthor');
 
 if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
 	$ENV{SVN_SSH} = $ENV{GIT_SSH};
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] svn: Create config options for common args
  2011-11-14 20:25 [PATCH] svn: Create config options for common args Ted Percival
@ 2011-11-14 21:46 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2011-11-14 21:46 UTC (permalink / raw)
  To: Ted Percival; +Cc: git

Ted Percival <ted.percival@quest.com> wrote:
>  Documentation/git-svn.txt |   10 ++++++++++

Thanks, documentation part is very much appreciated

> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -21,6 +21,9 @@ $Git::SVN::default_repo_id = 'svn';
>  $Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
>  $Git::SVN::Ra::_log_window_size = 100;
>  $Git::SVN::_minimize_url = 'unset';
> +$Git::SVN::_localtime = Git::config_bool('svn.localtime');
> +$Git::SVN::_add_author_from = Git::config_bool('svn.addAuthorFrom');
> +$Git::SVN::_use_log_author = Git::config_bool('svn.useLogAuthor');

I don't think these are needed.  The read_git_config() function /should/
be checking all GIT_CONFIG equivalents of the Getopt::Long option specs.
Can you verify?  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-14 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 20:25 [PATCH] svn: Create config options for common args Ted Percival
2011-11-14 21:46 ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).