git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Percival <ted.percival@quest.com>
To: <git@vger.kernel.org>
Cc: Eric Wong <normalperson@yhbt.net>, Ted Percival <ted.percival@quest.com>
Subject: [PATCH] svn: Create config options for common args
Date: Mon, 14 Nov 2011 13:25:10 -0700	[thread overview]
Message-ID: <1321302310-28793-1-git-send-email-ted.percival@quest.com> (raw)

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

             reply	other threads:[~2011-11-14 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 20:25 Ted Percival [this message]
2011-11-14 21:46 ` [PATCH] svn: Create config options for common args Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321302310-28793-1-git-send-email-ted.percival@quest.com \
    --to=ted.percival@quest.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).