{"thread":{"id":"43252","subject":"Re: git-cvsimport feature request","startedAt":"2006-12-12T12:42:21Z","lastAt":"2006-12-15T15:06:58Z","messageCount":3,"participants":["Johannes Schindelin","Nguyen Thai Ngoc Duy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"298348","messageId":"fcaeb9bf0612120442v4cd03a5fq44625fafed4217b7@mail.gmail.com","threadId":"43252","inReplyTo":null,"subject":"git-cvsimport feature request","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-12-12T12:42:21Z","receivedAt":"2006-12-12T12:42:21Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Well it's not really a feature but just for convenience. I suggest\nafter git-cvsimport successfully imports from CVS, it creates cvsup\nalias with given arguments. Later if I want to update from CVS, I only\nneed to \"git cvsup\" instead of typing the the same command with full\nof arguments again.\n-- \n"},{"id":"294141","messageId":"Pine.LNX.4.63.0612122305060.2807@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"43252","inReplyTo":"fcaeb9bf0612121334t454ec67av2c319382d1f61cce@mail.gmail.com","subject":"Re: git-cvsimport feature request","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-12T22:05:47Z","receivedAt":"2006-12-12T22:05:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[readding list...]\n\nOn Wed, 13 Dec 2006, Nguyen Thai Ngoc Duy wrote:\n\n> Hi,\n> \n> On 12/12/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > It could be done easily, but it is almost as easy to edit the command line\n> > to substitute \"git \" with \"git repo-config alias.cvsup '\" (note the\n> > single apostrophe at the end) and append and apostrophe at the end of the\n> > line.\n> \n> Thanks. I know that (and am doing that). Just think that it may be\n> more convenient typing the command once.\n\nSomething like this?\n\n-- snip --\n[PATCH] cvsimport: save the last successful command line as alias \"cvsup\"\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n git-cvsimport.perl |   13 +++++++++++++\n 1 files changed, 13 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex c5bf2d1..48fd55b 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -85,6 +85,12 @@ sub write_author_info($) {\n \tclose ($f);\n }\n \n+my $alias = \"cvsimport\";\n+foreach my $arg (@ARGV) {\n+\t$arg =~ s/[ \\\"]/\\\\&/g;\n+\t$alias .= ' ' . $arg;\n+}\n+\n getopts(\"hivmkuo:d:p:C:z:s:M:P:A:S:L:\") or usage();\n usage if $opt_h;\n \n@@ -946,6 +952,9 @@ if (defined $orig_git_index) {\n if ($orig_branch) {\n \tprint \"DONE.\\n\" if $opt_v;\n \tif ($opt_i) {\n+\t\t# uncomment this line, if the alias \"cvsup\" should be\n+\t\t# created/updated even with -i\n+\t\t#system(\"git-repo-config\", \"alias.cvsup\", $alias);\n \t\texit 0;\n \t}\n \tmy $tip_at_end = `git-rev-parse --verify HEAD`;\n@@ -971,3 +980,7 @@ if ($orig_branch) {\n \t\tdie \"checkout failed: $?\\n\" if $?;\n \t}\n }\n+\n+# so far, so good. store it as alias cvsup\n+system(\"git-repo-config\", \"alias.cvsup\", $alias);\n"},{"id":"297911","messageId":"fcaeb9bf0612150706g41a07a9fg3c268ef1893ccd27@mail.gmail.com","threadId":"43252","inReplyTo":"Pine.LNX.4.63.0612122305060.2807@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: git-cvsimport feature request","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-12-15T15:06:58Z","receivedAt":"2006-12-15T15:06:58Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Hi,\n\nOn 12/13/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > On 12/12/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > > It could be done easily, but it is almost as easy to edit the command line\n> > > to substitute \"git \" with \"git repo-config alias.cvsup '\" (note the\n> > > single apostrophe at the end) and append and apostrophe at the end of the\n> > > line.\n> >\n> > Thanks. I know that (and am doing that). Just think that it may be\n> > more convenient typing the command once.\n>\n> Something like this?\n\nIt works great. Thanks.\n-- \n"}]}