From: Andy Whitcroft <apw@shadowen.org>
To: git@vger.kernel.org
Subject: [PATCH 2/2] cvsimport: add <remote>/HEAD reference in separate remotes more
Date: Mon, 04 Jun 2007 10:01:49 +0100 [thread overview]
Message-ID: <b16b1562b7ac72cee8c402b702a750b6@pinky> (raw)
In-Reply-To: 4663D42A.7090201@shadowen.org
When in separate remote mode (via -r <remote>) we can now use
the name HEAD for the CVS HEAD. In keeping with git-clone
remotes/<remote>/HEAD is creates as a symbolic ref to the user
specified name for the HEAD which defaults to master.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 7837c7b..598b9c8 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -1026,6 +1026,8 @@ if ($orig_branch) {
print "DONE; creating $orig_branch branch\n" if $opt_v;
system("git-update-ref", "refs/heads/master", "$remote/$opt_o")
unless -f "$git_dir/refs/heads/master";
+ system("git-symbolic-ref", "$remote/HEAD", "$remote/$opt_o")
+ if ($opt_r && $opt_o ne 'HEAD');
system('git-update-ref', 'HEAD', "$orig_branch");
unless ($opt_i) {
system('git checkout');
next prev parent reply other threads:[~2007-06-04 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-30 0:56 [PATCH] cvsimport: add support for new style remote layout Andy Whitcroft
2007-05-30 13:24 ` James Bowes
2007-06-03 22:00 ` Junio C Hamano
2007-06-04 8:58 ` Andy Whitcroft
2007-06-04 9:01 ` [PATCH 1/2] cvsimport: update documentation to include separate remotes option Andy Whitcroft
2007-06-04 9:01 ` Andy Whitcroft [this message]
2007-06-06 11:52 ` [PATCH] cvsimport: add support for new style remote layout Jeffrey C. Ollie
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=b16b1562b7ac72cee8c402b702a750b6@pinky \
--to=apw@shadowen.org \
--cc=git@vger.kernel.org \
/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).