Re: cvsimport and branches with "(" in the name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 29, 2008 at 08:22:02AM +0100, Nigel Magnay wrote:

> git 1.5.4.4 on ubuntu, I cvsimport a repository that has an oddly
> named branch - I get
> 
> sh: Syntax error: "(" unexpected
> Cannot write branch ChapelHill_3_0(iteration2)_esap_demo for update:
> Bad file descriptor

Looks like cvsimport is handing something as an argument to a git
command, but we accidentally involve the shell. Maybe here:

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 95c5eec..bdac5d5 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -772,7 +772,7 @@ sub commit {
 	waitpid($pid,0);
 	die "Error running git-commit-tree: $?\n" if $?;
 
-	system("git-update-ref $remote/$branch $cid") == 0
+	system('git-update-ref', "$remote/$branch", $cid) == 0
 		or die "Cannot write branch $branch for update: $!\n";
 
 	if ($tag) {

Does that fix it?

> Any ideas on how to diagnose / fix it further ?

If that doesn't work, you might try running with GIT_TRACE=1, and then
you can see which commands are being run when the error occurs.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux