{"thread":{"id":"16469","subject":"Problem deleting remote branches","startedAt":"2008-11-26T04:04:39Z","lastAt":"2008-11-26T04:04:39Z","messageCount":1,"participants":["Jeff Mitchell"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96512","messageId":"492CCAD7.5000807@emailgoeshere.com","threadId":"16469","inReplyTo":null,"subject":"Problem deleting remote branches","fromName":"Jeff Mitchell","fromEmail":"kde-dev@emailgoeshere.com","sentAt":"2008-11-26T04:04:39Z","receivedAt":"2008-11-26T04:04:39Z","isPatch":false,"sender":{"key":"kde-dev@emailgoeshere.com","avatar":null},"body":"I'm running into a problem where it seems that you can't delete branches\nfrom a remote WebDAV/HTTP repository (at least, not using the methods\nyou would use for a git protocol-based repo).  It seems to be looking\nfor the wrong ref head.\n\n\nHere's a log of running the commands against github, using the native\ngit protocol:\n\n$ git checkout --track -b gittest jefferai\nBranch gittest set up to track local branch refs/heads/jefferai.\nSwitched to a new branch \"gittest\"\n\n$ git push origin gittest\nTotal 0 (delta 0), reused 0 (delta 0)\nTo git@github.com:jefferai/portage.git\n * [new branch]      gittest -> gittest\n\n$ git checkout jefferai\nSwitched to branch \"jefferai\"\n\n$ git branch -d -r origin/gittest\nDeleted remote branch origin/gittest.\n\n$ git push origin :gittest\nTo git@github.com:jefferai/portage.git\n - [deleted]         gittest\n\n\nHere's the same (near as I could get it) commands against my http-based\nserver.  Note that because of some other weirdness, I delete the local\nbranch that I push up, then re-fetch it as a remote tracking branch,\nthen try to do the delete:\n\n$ git checkout --track -b gittest jefferai\nBranch gittest set up to track local branch refs/heads/jefferai.         \nSwitched to a new branch \"gittest\"                                       \n\n$ git push myremote gittest\nFetching remote heads...                             \n  refs/                                              \n  refs/tags/                                         \n  refs/heads/                                        \nupdating 'refs/heads/gittest'                        \n  from 0000000000000000000000000000000000000000      \n  to   a4641f663ae86739b623a4b5bba7b284e5999549      \n                               \ndone                       \nUpdating remote server info                         \n\n$ git checkout jefferai\nSwitched to branch \"jefferai\"\n\n$ git branch -d gittest\nDeleted branch gittest.                               \n\n$ git fetch myremote\nFrom https://[my,server.com]/amarok                  \n * [new branch]      gittest    -> myremote/gittest        \n\n$ git checkout --track -b gittest myremote/gittest\nBranch gittest set up to track remote branch refs/remotes/myremote/gittest.\nSwitched to a new branch \"gittest\"\n\n$ git checkout jefferai\nSwitched to branch \"jefferai\"\n\n$ git branch -r -d myremote/gittest\nDeleted branch gittest.\n\n$ git push myremote :gittest\nFetching remote heads...\n  refs/\n  refs/tags/\n  refs/heads/\nfatal: Couldn't get https://[my.server.com]/amarok.git/refs/heads/master\nfor remote symref\nThe requested URL returned error: 404\nerror: failed to push some refs to 'https://[my.server.com]/amarok.git'\n\n\nNote the third to last line:\n\nCouldn't get https://[my.server.com]/amarok.git/refs/heads/master\n\nOn my webserver, in the repository, I have the following in refs/heads:\n\nbookcase amarok.git # ls refs/heads/\ngittest  jefferai\n\n\nI do have a \"master\" branch -- that's where the \"jefferai\" branch was\nspawned from, which the \"gittest\" branch was spawned from -- but I have\nno idea why it's looking for it.\n\n\nMy remote ref for github looks like:\n\n[remote \"origin\"]\n        url = git@github.com:jefferai/portage.git\n        fetch = +refs/heads/*:refs/remotes/origin/*\n\nand my remote ref for my server looks like:\n\n[remote \"myremote\"]\n        url = https://[my.server.com]/amarok.git\n        fetch = +refs/heads/*:refs/remotes/myremote/*\n\n\nThis smells like a bug, unless there's something I'm doing wrong that I\ncan't figure out.\n\nHelp much appreciated.\n\nThanks,\nJeff\n"}]}