git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-cvsimport feature request
Date: Tue, 12 Dec 2006 23:05:47 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.63.0612122305060.2807@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <fcaeb9bf0612121334t454ec67av2c319382d1f61cce@mail.gmail.com>

Hi,

[readding list...]

On Wed, 13 Dec 2006, Nguyen Thai Ngoc Duy wrote:

> Hi,
> 
> On 12/12/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > It could be done easily, but it is almost as easy to edit the command line
> > to substitute "git " with "git repo-config alias.cvsup '" (note the
> > single apostrophe at the end) and append and apostrophe at the end of the
> > line.
> 
> Thanks. I know that (and am doing that). Just think that it may be
> more convenient typing the command once.

Something like this?

-- snip --
[PATCH] cvsimport: save the last successful command line as alias "cvsup"

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 git-cvsimport.perl |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index c5bf2d1..48fd55b 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -85,6 +85,12 @@ sub write_author_info($) {
 	close ($f);
 }
 
+my $alias = "cvsimport";
+foreach my $arg (@ARGV) {
+	$arg =~ s/[ \"]/\\&/g;
+	$alias .= ' ' . $arg;
+}
+
 getopts("hivmkuo:d:p:C:z:s:M:P:A:S:L:") or usage();
 usage if $opt_h;
 
@@ -946,6 +952,9 @@ if (defined $orig_git_index) {
 if ($orig_branch) {
 	print "DONE.\n" if $opt_v;
 	if ($opt_i) {
+		# uncomment this line, if the alias "cvsup" should be
+		# created/updated even with -i
+		#system("git-repo-config", "alias.cvsup", $alias);
 		exit 0;
 	}
 	my $tip_at_end = `git-rev-parse --verify HEAD`;
@@ -971,3 +980,7 @@ if ($orig_branch) {
 		die "checkout failed: $?\n" if $?;
 	}
 }
+
+# so far, so good. store it as alias cvsup
+system("git-repo-config", "alias.cvsup", $alias);

  parent reply	other threads:[~2006-12-12 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-12 12:42 git-cvsimport feature request Nguyen Thai Ngoc Duy
     [not found] ` <Pine.LNX.4.63.0612121535290.2807@wbgn013.biozentrum.uni-wuerzburg.de>
     [not found]   ` <fcaeb9bf0612121334t454ec67av2c319382d1f61cce@mail.gmail.com>
2006-12-12 22:05     ` Johannes Schindelin [this message]
2006-12-15 15:06       ` Nguyen Thai Ngoc Duy

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0612122305060.2807@wbgn013.biozentrum.uni-wuerzburg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).