Re: git push bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-10-18 at 18:01 +0200, Joakim Tjernlund wrote:
> On Thu, 2007-10-18 at 17:14 +0200, Steffen Prohaska wrote:
> > On Oct 18, 2007, at 4:50 PM, Joakim Tjernlund wrote:
> > 
> > >
> > > I thougth I could create a new branch on the server using:
> > >
> > > # > git push ssh://devsrv/var/git/os2kernel.git linus:refs/linus
> > > Warning: No xauth data; using fake authentication data for X11  
> > > forwarding.
> > > updating 'refs/linus' using 'refs/heads/linus'
> > >  from 0000000000000000000000000000000000000000
> > >  to bbf25010f1a6b761914430f5fca081ec8c7accd1
> > > Generating pack...
> > > Done counting 0 objects.
> > > Writing 0 objects...
> > > Total 0 (delta 0), reused 0 (delta 0)
> > > error: refusing to create funny ref 'refs/linus' locally
> > > ng refs/linus funny refname
> > > error: failed to push to 'ssh://devsrv/var/git/os2kernel.git'
> > >
> > > but that doesn't work. Am I doing this wrong?
> > 
> > Include 'heads' in your remote refspec:
> > 
> >     git push ssh://devsrv/var/git/os2kernel.git linus:refs/heads/linus
> 
> Now the push went OK:
> git push  ssh://devsrv/var/git/os2kernel.git linus:refs/head/linus
> Warning: No xauth data; using fake authentication data for X11 forwarding.
> updating 'refs/head/linus' using 'refs/heads/linus'
>   from 0000000000000000000000000000000000000000
>   to   bbf25010f1a6b761914430f5fca081ec8c7accd1
> Generating pack...
> Done counting 0 objects.
> Writing 0 objects...
> Total 0 (delta 0), reused 0 (delta 0)
> refs/head/linus: 0000000000000000000000000000000000000000 -> bbf25010f1a6b761914430f5fca081ec8c7accd1
> 
> but there is no linus branch in the server repo!
> 
> However:
>  git push  ssh://devsrv/var/git/os2kernel.git linus
> 
> creates a linus branch in the server and 
> 
>  git push  ssh://devsrv/var/git/os2kernel.git :linus
>  Warning: No xauth data; using fake authentication data for X11 forwarding. 
>  deleting 'refs/heads/linus'
>  refs/heads/linus: bbf25010f1a6b761914430f5fca081ec8c7accd1 -> deleted
>  Everything up-to-date
> 
> deletes the linus branch on the server and so does
> git push  ssh://devsrv/var/git/os2kernel.git :refs/heads/linus
> 
> ahh, now I see. When creating the branch the refspec needs to be refs/heads/linus,
> not refs/head/linus
> 
> refs/head/linus will create just that on the server. git branch does not look
> there, only in refs/heads
> 
> Seems like it is a bit too easy to make mistakes here. Why can I delete
> a branch with :linus but not create one with linus:linus?
> Also confusing that git lets me create refs/head/linus when git branch
> cannot find it.
> 
>  Jocke

BTW this does not work either:

git reset --hard HEAD^
git push -f  ssh://devsrv/var/git/os2kernel.git +master:master
updating 'refs/heads/master'
  from 9c344d18d01221c8f25080cb58910e6b09efbf55
  to   5761a9e5924b34615c748fba2dcb977ed04c1243
Generating pack...
Done counting 0 objects.
Writing 0 objects...
Total 0 (delta 0), reused 0 (delta 0)
error: denying non-fast forward refs/heads/master (you should pull first)
ng refs/heads/master non-fast forward
error: failed to push to 'ssh://devsrv/var/git/os2kernel.git'

I thought the + in +master:master and the -f option should let me
do that.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux