git fetch specific ref fails when run against a remote where HEAD points to missing master branch

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

 



Hi,

I am assuming this is simply a configuration issue on my end for this
particular remote, because I never pushed to the master branch, and so
the HEAD of this remote doesn't exist.

However, I am also using it to fetch specific refs I know the name of,
so it confuses me when I try to fetch and get back a failure, because
the remote HEAD ref doesn't exist...

Command "git fetch --tags --progress git://gitlad.jf.intel.com/git/jekeller/testing/ixgbe +refs/heads/*:refs/remotes/origin/*" returned status code 1:
stdout: Fetching submodule src/COMPAT

stderr: remote: Counting objects: 9, done.        
remote: Compressing objects:  33% (1/3)           
remote: Compressing objects:  66% (2/3)           
remote: Compressing objects: 100% (3/3)           
remote: Compressing objects: 100% (3/3), done.        
remote: Total 3 (delta 1), reused 0 (delta 0)        
>From git://gitlad.jf.intel.com/git/jekeller/testing/ixgbe
 * [new branch]      2014-09-17-b6c6ff2c76ae -> origin/2014-09-17-b6c6ff2c76ae
fatal: Couldn't find remote ref HEAD

So in order to understand what I am doing:

I have a continuous integration build, which I can pre-test a series of
commits before pushing it to the real remote, by pushing to a ref in
this repository, and then indicating to my continuous build server to
test against that ref.

As it turns out, my remote didn't have a master branch, (as I never
pushed anything there!), and so even though it was a bare repository,
HEAD was pointing still to refs/heads/master

I fixed this issue by adding a master branch that was empty. I also
assume I could have updated HEAD to point to a different location if I
wanted also.. but I'm not sure this should be an error in the case that
I fetch a specific ref by command line parameter? Especially as it
manages to fetch all the refs I asked for correctly, but still fails
with a non-zero exit value.

Regards,
Jake
��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[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]