{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/3405","labels_url":"https://api.github.com/repos/libgit2/libgit2/issues/3405/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/3405/comments","events_url":"https://api.github.com/repos/libgit2/libgit2/issues/3405/events","html_url":"https://github.com/libgit2/libgit2/issues/3405","id":104155874,"number":3405,"title":"libgit2 doesn't push properly 2 refs without common ancestor to GitHub server","user":{"login":"swisspol","id":627915,"avatar_url":"https://avatars.githubusercontent.com/u/627915?v=3","gravatar_id":"","url":"https://api.github.com/users/swisspol","html_url":"https://github.com/swisspol","followers_url":"https://api.github.com/users/swisspol/followers","following_url":"https://api.github.com/users/swisspol/following{/other_user}","gists_url":"https://api.github.com/users/swisspol/gists{/gist_id}","starred_url":"https://api.github.com/users/swisspol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swisspol/subscriptions","organizations_url":"https://api.github.com/users/swisspol/orgs","repos_url":"https://api.github.com/users/swisspol/repos","events_url":"https://api.github.com/users/swisspol/events{/privacy}","received_events_url":"https://api.github.com/users/swisspol/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-31T23:55:13Z","updated_at":"2015-09-03T09:01:57Z","closed_at":"2015-09-03T09:01:56Z","body":"I have a test bare repo with has 2 branches: `master` and `test`. Both are up-to-date with the corresponding private repo on GitHub.\r\n\r\nI'm calling `git_remote_upload()` passing 2 refspecs to push over SSH:\r\n- `refs/heads/master:refs/heads/master`\r\n- `refs/heads/test:refs/heads/test`\r\n\r\nThe push fails and the GitHub server simply says \"001fng refs/heads/test\\n failed\\n\" (the fact libgit2 fails to properly parse this report line is covered by #3404).\r\n\r\nIf I push each separately i.e. one at a time using `git_remote_upload()`, then the GitHub server accepts them without failing.\r\n\r\nGit CLT is also able to push both refs to the GitHub server, so it appears there's a problem with libgit2:\r\n```\r\n$ GIT_TRACE=1 GIT_TRACE_PACKET=1 git push -v origin refs/heads/master:refs/heads/master refs/heads/test:refs/heads/test\r\n16:51:09.132787 git.c:348               trace: built-in: git 'push' '-v' 'origin' 'refs/heads/master:refs/heads/master' 'refs/heads/test:refs/heads/test'\r\nPushing to git@github.com:swisspol/Decks.git\r\n16:51:09.134982 run-command.c:347       trace: run_command: 'ssh' 'git@github.com' 'git-receive-pack '\\''swisspol/Decks.git'\\'''\r\n16:51:10.587824 pkt-line.c:46           packet:         push< 37725a382f40e7c13efdcdea4589c70964338d08 refs/heads/master\\0report-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2:2.4.8+github-1117-g10c819b\r\n16:51:10.587878 pkt-line.c:46           packet:         push< 8f400acce001fb3a8391d0ad7ec94437ae5241df refs/heads/test\r\n16:51:10.587887 pkt-line.c:46           packet:         push< 0000\r\n16:51:10.587986 pkt-line.c:46           packet:         push> 0000\r\nTo git@github.com:swisspol/Decks.git\r\n = [up to date]      master -> master\r\n = [up to date]      test -> test\r\nupdating local tracking ref 'refs/remotes/origin/master'\r\nupdating local tracking ref 'refs/remotes/origin/test'\r\nEverything up-to-date\r\n```\r\n\r\nPS: These 2 refs have no common ancestor (i.e. they lead to separate roots).\r\n\r\n![image](https://cloud.githubusercontent.com/assets/627915/9592811/b4b2aa8e-4ffb-11e5-9468-45e22914c159.png)"},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/137384349","html_url":"https://github.com/libgit2/libgit2/issues/3405#issuecomment-137384349","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/3405","id":137384349,"user":{"login":"carlosmn","id":335443,"avatar_url":"https://avatars.githubusercontent.com/u/335443?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosmn","html_url":"https://github.com/carlosmn","followers_url":"https://api.github.com/users/carlosmn/followers","following_url":"https://api.github.com/users/carlosmn/following{/other_user}","gists_url":"https://api.github.com/users/carlosmn/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmn/subscriptions","organizations_url":"https://api.github.com/users/carlosmn/orgs","repos_url":"https://api.github.com/users/carlosmn/repos","events_url":"https://api.github.com/users/carlosmn/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmn/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T09:01:56Z","updated_at":"2015-09-03T09:01:56Z","body":"Excellent. Since this was a server-side issue, I'll close the bug, and we'll react to the LF issue as the ML reacts to it."}}