Well, appveyor does a 'git clone --branch branchname' which doesn't get a
master refspec if building on a branch.

So unless there's another way to get the master branch GitVersion fails
because it cannot find the master branch.

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));
>
> Do we *need* to update The Push refspecs as well (ie. Does it not work if
> we don't)?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Particular/GitVersion/pull/123/files#r10971512>
> .
>