clone.sh: properly set HEAD on initial clone
commit877b57e868376e292a7e912966096e89a29b93de
authorKyle J. McKay <mackyle@gmail.com>
Tue, 16 Sep 2014 02:51:07 +0000 (15 19:51 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 16 Sep 2014 02:51:07 +0000 (15 19:51 -0700)
tree9b2b4404fdb6a1f8ed14f5b844162db375347f5f
parent01435b75aff9f5a44dc1f74182e97ac2336dc0fd
clone.sh: properly set HEAD on initial clone

Rather than leaving HEAD set to a symbolic ref to
refs/heads/master, attempt to find a refs/heads/... ref
that points to the same value as HEAD and then set HEAD
to be a symbolic ref to that ref instead.

If there's more than one match, the first is chosen.

If no match is found then HEAD is left alone and will
remain set to a symbolic ref to refs/heads/master.
taskd/clone.sh