git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] cvsimport: add <remote>/HEAD reference in separate remotes more

From
Andy Whitcroft <apw@shadowen.org>
Date
Jun 4, 2007, 09:01 UTC
Message-ID
<b16b1562b7ac72cee8c402b702a750b6@pinky>
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');
Previous: Andy WhitcroftNext: Jeffrey C. Ollie
Message 6 of 7 in “cvsimport: add support for new style remote layout”
  1. cvsimport: add support for new style remote layoutAndy Whitcroft, May 30, 2007
  2. James BowesMay 30, 2007
  3. Junio C HamanoJun 3, 2007
  4. Andy WhitcroftJun 4, 2007
  5. 1/2 cvsimport: update documentation to include separate remotes optionAndy Whitcroft, Jun 4, 2007
  6. 2/2 cvsimport: add <remote>/HEAD reference in separate remotes moreAndy Whitcroft, Jun 4, 2007
  7. Jeffrey C. OllieJun 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.