(#260) Correcing AppVeyor Support for Pull Requests

- As per discussion with @nulltoken, implemented a fix for AppVeyor where if the commit sha is not present of any detected local branches, check out a new branch using the sha as the pointer
Ooo clever! I like it! Will get this included! :-)

Sent from my Windows Phone
________________________________
From: nulltoken<mailto:notifications@github.com>
Sent: ‎26/‎09/‎2014 18:49
To: Particular/GitVersion<mailto:GitVersion@noreply.github.com>
Cc: Gary Ewan Park<mailto:gep13@gep13.co.uk>
Subject: Re: [GitVersion] (#260) Correcing AppVeyor Support for Pull Requests (#262)

>                      return;
>                  }
> +
> +                Logger.WriteInfo(string.Format("HEAD is detached and points at commit '{0}'.", headSha));
> +
> +                // In order to decide whether a fake branch is required or not, first check to see if any local branches have the same commit SHA of the head SHA.
> +                // If they do, go ahead and checkout that branch
> +                // If no, go ahead and check out a new branch, using the known commit SHA as the pointer
> +                var localBranchesWhereCommitShaIsHead = repo.Branches.Where(b => b.Tip.Sha == headSha).ToList();

```
.Where(b => !b.IsRemote && b.Tip.Sha == headSha).ToList();
```

---
Reply to this email directly or view it on GitHub:
https://github.com/Particular/GitVersion/pull/262/files#r18103422