I'll have to try that when I get home. I'm not that familiar with libgit2
so I wasn't sure what to do.

With treating it as a misconfuguration, given this code is used by the
appveyor configuration it makes no sense to fail if master is missing.

On Wednesday, March 26, 2014, nulltoken <notifications@github.com> wrote:

> In GitVersion/BuildServers/GitHelper.cs:
>
> >              }
> >          }
> >
> > +        static void FetchMissingMasterRefSpec(Repository repo, Remote remote)
> > +        {
> > +            if (remote.FetchRefSpecs.Any(r => r.Source == "refs/heads/master"))
> > +                return;
> > +
> > +            string masterRefSpec = string.Format("+refs/heads/master:refs/remotes/{0}/master", remote.Name);
> > +
> > +            Logger.WriteInfo(string.Format("Adding refspec: {0}", masterRefSpec));
> > +
> > +            repo.Network.Remotes.Update(remote,
> > +                r => r.FetchRefSpecs.Add(masterRefSpec),
> > +                r => r.PushRefSpecs.Add(masterRefSpec));
>
>  Well, appveyor does a 'git clone --branch branchname' which doesn't get
> a master refspec if building on a branch.
>
> So we wouldn't need to update the push refspecs, in that case.
>
> repo.Network.Remotes.Update(remote, r => r.FetchRefSpecs.Add(masterRefSpec));
>
> And [image: :point_up:] may be enough.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Particular/GitVersion/pull/123/files#r10972514>
> .
>