{"thread":{"id":"6269","subject":"[BUG] cogito: cg-push fails when using stg","startedAt":"2007-01-07T18:57:34Z","lastAt":"2007-01-07T18:57:34Z","messageCount":1,"participants":["Baz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"31066","messageId":"2faad3050701071057s2d4b55dcp4e957db6846a54e5@mail.gmail.com","threadId":"6269","inReplyTo":null,"subject":"[BUG] cogito: cg-push fails when using stg","fromName":"Baz","fromEmail":"brian.ewins@gmail.com","sentAt":"2007-01-07T18:57:34Z","receivedAt":"2007-01-07T18:57:34Z","isPatch":false,"sender":{"key":"brian.ewins@gmail.com","avatar":"https://gravatar.com/avatar/9ac03d89105e50a7151e695a1b4b1228151064ec3ac380a73b74ab397796baf7?d=mp&s=160"},"body":"Hi,\nI've been using cogito and stg together on cairo and I ran into\nproblems attempting to do a cg-push.\n\n$ cg-push\nerror: src refspec master matches more than one.\nfatal: unexpected EOF\n\nIt turns out this is matching refs/heads/master and refs/bases/master;\nthe second of these is an stg artifact, but not the current branch. I\nthink there's a bug in cogito here, in cg-Xlib:\n\n[ ! -s \"$_git/HEAD\" ] || { _git_head=\"$(git-symbolic-ref HEAD)\";\n_git_head=\"${_git_head#refs/heads/}\"; }\n\nThis sets _git_head (which is eventually used as the src refspec for\nthe cg-push) to the unambiguous refs/heads/master, but then makes it\nambiguous again by stripping off the prefix.\n\nYou can work around this by doing:\ncg-push -r refs/heads/master\n\nwhich is just as odd, since thats a refspec, not a branch name - the\nsame logic to resolve the name isn't being applied. So alternatively,\nthe bug is here (in cg-push):\nlocbranch=\"$_git_head\"\n... should be\nlocbranch=\"refs/heads/$_git_head\"\nand\nlocbranch=\"$OPTARG\"\nshould be\nlocbranch=\"refs/heads/$OPTARG\"\n\nComments?\n\nBaz\n"}]}