{"thread":{"id":"13441","subject":"[PATCH] cvsexportcommit: Create config option for CVS dir","startedAt":"2008-05-08T21:26:55Z","lastAt":"2008-05-21T20:01:15Z","messageCount":3,"participants":["Trent Piepho","Junio C Hamano","Robin Rosenberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"76412","messageId":"1210282015-20872-1-git-send-email-tpiepho@freescale.com","threadId":"13441","inReplyTo":null,"subject":"[PATCH] cvsexportcommit: Create config option for CVS dir","fromName":"Trent Piepho","fromEmail":"tpiepho@freescale.com","sentAt":"2008-05-08T21:26:55Z","receivedAt":"2008-05-08T21:26:55Z","isPatch":true,"sender":{"key":"tpiepho@gmail.com","avatar":null},"body":"For a given project the directory used with the -w option is almost always\nthe same each time.  Let it be specified with 'cvsexportcommit.cvsdir' so\nit's not necessary to manually add it with -w each time.\n\nSigned-off-by: Trent Piepho <tpiepho@freescale.com>\n---\n Documentation/git-cvsexportcommit.txt |    8 +++++++-\n git-cvsexportcommit.perl              |    5 +++++\n 2 files changed, 12 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\nindex 9a47b4c..363c36d 100644\n--- a/Documentation/git-cvsexportcommit.txt\n+++ b/Documentation/git-cvsexportcommit.txt\n@@ -65,11 +65,17 @@ OPTIONS\n -w::\n \tSpecify the location of the CVS checkout to use for the export. This\n \toption does not require GIT_DIR to be set before execution if the\n-\tcurrent directory is within a git repository.\n+\tcurrent directory is within a git repository.  The default is the\n+\tvalue of 'cvsexportcommit.cvsdir'.\n \n -v::\n \tVerbose.\n \n+CONFIGURATION\n+-------------\n+cvsexportcommit.cvsdir::\n+\tThe default location of the CVS checkout to use for the export.\n+\n EXAMPLES\n --------\n \ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex b6036bd..c93bd9c 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -6,6 +6,7 @@ use File::Temp qw(tempdir);\n use Data::Dumper;\n use File::Basename qw(basename dirname);\n use File::Spec;\n+use Git;\n \n our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u, $opt_w);\n \n@@ -15,6 +16,10 @@ $opt_h && usage();\n \n die \"Need at least one commit identifier!\" unless @ARGV;\n \n+# Get git-config settings\n+my $repo = Git->repository();\n+$opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;\n+\n if ($opt_w) {\n \t# Remember where GIT_DIR is before changing to CVS checkout\n \tunless ($ENV{GIT_DIR}) {\n-- \n1.5.4.1\n"},{"id":"77417","messageId":"7vprrf1lmd.fsf@gitster.siamese.dyndns.org","threadId":"13441","inReplyTo":"1210282015-20872-1-git-send-email-tpiepho@freescale.com","subject":"Re: [PATCH] cvsexportcommit: Create config option for CVS dir","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-21T19:51:38Z","receivedAt":"2008-05-21T19:51:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Last night I was going through old mail-logs and found this, which I think\nwould be nice.  Does anybody see anything wrong with the patch?\n\nTrent Piepho <tpiepho@freescale.com> writes:\n\n> For a given project the directory used with the -w option is almost always\n> the same each time.  Let it be specified with 'cvsexportcommit.cvsdir' so\n> it's not necessary to manually add it with -w each time.\n>\n> Signed-off-by: Trent Piepho <tpiepho@freescale.com>\n> ---\n>  Documentation/git-cvsexportcommit.txt |    8 +++++++-\n>  git-cvsexportcommit.perl              |    5 +++++\n>  2 files changed, 12 insertions(+), 1 deletions(-)\n>\n> diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\n> index 9a47b4c..363c36d 100644\n> --- a/Documentation/git-cvsexportcommit.txt\n> +++ b/Documentation/git-cvsexportcommit.txt\n> @@ -65,11 +65,17 @@ OPTIONS\n>  -w::\n>  \tSpecify the location of the CVS checkout to use for the export. This\n>  \toption does not require GIT_DIR to be set before execution if the\n> -\tcurrent directory is within a git repository.\n> +\tcurrent directory is within a git repository.  The default is the\n> +\tvalue of 'cvsexportcommit.cvsdir'.\n>  \n>  -v::\n>  \tVerbose.\n>  \n> +CONFIGURATION\n> +-------------\n> +cvsexportcommit.cvsdir::\n> +\tThe default location of the CVS checkout to use for the export.\n> +\n>  EXAMPLES\n>  --------\n>  \n> diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\n> index b6036bd..c93bd9c 100755\n> --- a/git-cvsexportcommit.perl\n> +++ b/git-cvsexportcommit.perl\n> @@ -6,6 +6,7 @@ use File::Temp qw(tempdir);\n>  use Data::Dumper;\n>  use File::Basename qw(basename dirname);\n>  use File::Spec;\n> +use Git;\n>  \n>  our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u, $opt_w);\n>  \n> @@ -15,6 +16,10 @@ $opt_h && usage();\n>  \n>  die \"Need at least one commit identifier!\" unless @ARGV;\n>  \n> +# Get git-config settings\n> +my $repo = Git->repository();\n> +$opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;\n> +\n>  if ($opt_w) {\n>  \t# Remember where GIT_DIR is before changing to CVS checkout\n>  \tunless ($ENV{GIT_DIR}) {\n> -- \n> 1.5.4.1\n"},{"id":"77419","messageId":"200805212201.16080.robin.rosenberg.lists@dewire.com","threadId":"13441","inReplyTo":"7vprrf1lmd.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] cvsexportcommit: Create config option for CVS dir","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2008-05-21T20:01:15Z","receivedAt":"2008-05-21T20:01:15Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"onsdagen den 21 maj 2008 21.51.38 skrev Junio C Hamano:\n> Last night I was going through old mail-logs and found this, which I think\n> would be nice.  Does anybody see anything wrong with the patch?\n\nNo, this looks reallu useful. Ack.\n\n-- robin\n\n> \n> Trent Piepho <tpiepho@freescale.com> writes:\n> \n> > For a given project the directory used with the -w option is almost always\n> > the same each time.  Let it be specified with 'cvsexportcommit.cvsdir' so\n> > it's not necessary to manually add it with -w each time.\n> >\n> > Signed-off-by: Trent Piepho <tpiepho@freescale.com>\n> > ---\n> >  Documentation/git-cvsexportcommit.txt |    8 +++++++-\n> >  git-cvsexportcommit.perl              |    5 +++++\n> >  2 files changed, 12 insertions(+), 1 deletions(-)\n> >\n> > diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\n> > index 9a47b4c..363c36d 100644\n> > --- a/Documentation/git-cvsexportcommit.txt\n> > +++ b/Documentation/git-cvsexportcommit.txt\n> > @@ -65,11 +65,17 @@ OPTIONS\n> >  -w::\n> >  \tSpecify the location of the CVS checkout to use for the export. This\n> >  \toption does not require GIT_DIR to be set before execution if the\n> > -\tcurrent directory is within a git repository.\n> > +\tcurrent directory is within a git repository.  The default is the\n> > +\tvalue of 'cvsexportcommit.cvsdir'.\n> >  \n> >  -v::\n> >  \tVerbose.\n> >  \n> > +CONFIGURATION\n> > +-------------\n> > +cvsexportcommit.cvsdir::\n> > +\tThe default location of the CVS checkout to use for the export.\n> > +\n> >  EXAMPLES\n> >  --------\n> >  \n> > diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\n> > index b6036bd..c93bd9c 100755\n> > --- a/git-cvsexportcommit.perl\n> > +++ b/git-cvsexportcommit.perl\n> > @@ -6,6 +6,7 @@ use File::Temp qw(tempdir);\n> >  use Data::Dumper;\n> >  use File::Basename qw(basename dirname);\n> >  use File::Spec;\n> > +use Git;\n> >  \n> >  our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u, $opt_w);\n> >  \n> > @@ -15,6 +16,10 @@ $opt_h && usage();\n> >  \n> >  die \"Need at least one commit identifier!\" unless @ARGV;\n> >  \n> > +# Get git-config settings\n> > +my $repo = Git->repository();\n> > +$opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;\n> > +\n> >  if ($opt_w) {\n> >  \t# Remember where GIT_DIR is before changing to CVS checkout\n> >  \tunless ($ENV{GIT_DIR}) {\n> > -- \n> > 1.5.4.1\n>\n"}]}