git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Mitchell <kde-dev@emailgoeshere.com>
To: git@vger.kernel.org
Subject: Problem deleting remote branches
Date: Tue, 25 Nov 2008 23:04:39 -0500	[thread overview]
Message-ID: <492CCAD7.5000807@emailgoeshere.com> (raw)

I'm running into a problem where it seems that you can't delete branches
from a remote WebDAV/HTTP repository (at least, not using the methods
you would use for a git protocol-based repo).  It seems to be looking
for the wrong ref head.


Here's a log of running the commands against github, using the native
git protocol:

$ git checkout --track -b gittest jefferai
Branch gittest set up to track local branch refs/heads/jefferai.
Switched to a new branch "gittest"

$ git push origin gittest
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:jefferai/portage.git
 * [new branch]      gittest -> gittest

$ git checkout jefferai
Switched to branch "jefferai"

$ git branch -d -r origin/gittest
Deleted remote branch origin/gittest.

$ git push origin :gittest
To git@github.com:jefferai/portage.git
 - [deleted]         gittest


Here's the same (near as I could get it) commands against my http-based
server.  Note that because of some other weirdness, I delete the local
branch that I push up, then re-fetch it as a remote tracking branch,
then try to do the delete:

$ git checkout --track -b gittest jefferai
Branch gittest set up to track local branch refs/heads/jefferai.         
Switched to a new branch "gittest"                                       

$ git push myremote gittest
Fetching remote heads...                             
  refs/                                              
  refs/tags/                                         
  refs/heads/                                        
updating 'refs/heads/gittest'                        
  from 0000000000000000000000000000000000000000      
  to   a4641f663ae86739b623a4b5bba7b284e5999549      
                               
done                       
Updating remote server info                         

$ git checkout jefferai
Switched to branch "jefferai"

$ git branch -d gittest
Deleted branch gittest.                               

$ git fetch myremote
From https://[my,server.com]/amarok                  
 * [new branch]      gittest    -> myremote/gittest        

$ git checkout --track -b gittest myremote/gittest
Branch gittest set up to track remote branch refs/remotes/myremote/gittest.
Switched to a new branch "gittest"

$ git checkout jefferai
Switched to branch "jefferai"

$ git branch -r -d myremote/gittest
Deleted branch gittest.

$ git push myremote :gittest
Fetching remote heads...
  refs/
  refs/tags/
  refs/heads/
fatal: Couldn't get https://[my.server.com]/amarok.git/refs/heads/master
for remote symref
The requested URL returned error: 404
error: failed to push some refs to 'https://[my.server.com]/amarok.git'


Note the third to last line:

Couldn't get https://[my.server.com]/amarok.git/refs/heads/master

On my webserver, in the repository, I have the following in refs/heads:

bookcase amarok.git # ls refs/heads/
gittest  jefferai


I do have a "master" branch -- that's where the "jefferai" branch was
spawned from, which the "gittest" branch was spawned from -- but I have
no idea why it's looking for it.


My remote ref for github looks like:

[remote "origin"]
        url = git@github.com:jefferai/portage.git
        fetch = +refs/heads/*:refs/remotes/origin/*

and my remote ref for my server looks like:

[remote "myremote"]
        url = https://[my.server.com]/amarok.git
        fetch = +refs/heads/*:refs/remotes/myremote/*


This smells like a bug, unless there's something I'm doing wrong that I
can't figure out.

Help much appreciated.

Thanks,
Jeff

                 reply	other threads:[~2008-11-26  4:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492CCAD7.5000807@emailgoeshere.com \
    --to=kde-dev@emailgoeshere.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).