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

[BUG] cogito: cg-push fails when using stg

From
Baz <brian.ewins@gmail.com>
Date
Jan 7, 2007, 18:57 UTC
Message-ID
<2faad3050701071057s2d4b55dcp4e957db6846a54e5@mail.gmail.com>

Hi, I've been using cogito and stg together on cairo and I ran into problems attempting to do a cg-push.

$ cg-push error: src refspec master matches more than one. fatal: unexpected EOF

It turns out this is matching refs/heads/master and refs/bases/master; the second of these is an stg artifact, but not the current branch. I think there's a bug in cogito here, in cg-Xlib:

[ ! -s "$_git/HEAD" ] || { _git_head="$(git-symbolic-ref HEAD)"; _git_head="${_git_head#refs/heads/}"; }

This sets _git_head (which is eventually used as the src refspec for the cg-push) to the unambiguous refs/heads/master, but then makes it ambiguous again by stripping off the prefix.

You can work around this by doing: cg-push -r refs/heads/master

which is just as odd, since thats a refspec, not a branch name - the same logic to resolve the name isn't being applied. So alternatively, the bug is here (in cg-push): locbranch="$_git_head" ... should be locbranch="refs/heads/$_git_head" and locbranch="$OPTARG" should be locbranch="refs/heads/$OPTARG"

Comments?
Baz
Message 1 of 1 in “[BUG] cogito: cg-push fails when using stg”
  1. BazJan 7, 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.