summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 824b5dc)
raw | patch | inline | side by side (parent: 824b5dc)
author | Trent Piepho <tpiepho@freescale.com> | |
Thu, 8 May 2008 21:26:55 +0000 (14:26 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 21 May 2008 20:07:41 +0000 (13:07 -0700) |
For a given project the directory used with the -w option is almost always
the same each time. Let it be specified with 'cvsexportcommit.cvsdir' so
it's not necessary to manually add it with -w each time.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the same each time. Let it be specified with 'cvsexportcommit.cvsdir' so
it's not necessary to manually add it with -w each time.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-cvsexportcommit.txt | patch | blob | history | |
git-cvsexportcommit.perl | patch | blob | history |
index 9a47b4c397cec8e6782962bfe6766eee48b78ce1..363c36d694231c5876527ff0d062fbd385d66630 100644 (file)
-w::
Specify the location of the CVS checkout to use for the export. This
option does not require GIT_DIR to be set before execution if the
- current directory is within a git repository.
+ current directory is within a git repository. The default is the
+ value of 'cvsexportcommit.cvsdir'.
-v::
Verbose.
+CONFIGURATION
+-------------
+cvsexportcommit.cvsdir::
+ The default location of the CVS checkout to use for the export.
+
EXAMPLES
--------
index b6036bd4d305215b4a70b6fd0fe54d7607dbe068..c93bd9c9b553f18b29e72a08176588d889e7acde 100755 (executable)
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
use Data::Dumper;
use File::Basename qw(basename dirname);
use File::Spec;
+use Git;
our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u, $opt_w);
die "Need at least one commit identifier!" unless @ARGV;
+# Get git-config settings
+my $repo = Git->repository();
+$opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;
+
if ($opt_w) {
# Remember where GIT_DIR is before changing to CVS checkout
unless ($ENV{GIT_DIR}) {