Make Git repository rules compatible with older Git versions.

CentOS 7 includes git 1.8.3.1, which needs an explicit destination ref
in the refspec passed to fetch, otherwise it doesn't create a local ref,
so the `git reset origin/<branch>` later would fail.

PiperOrigin-RevId: 254746054
diff --git a/tools/build_defs/repo/git_worker.bzl b/tools/build_defs/repo/git_worker.bzl
index c7e9148..4cb3cc2 100644
--- a/tools/build_defs/repo/git_worker.bzl
+++ b/tools/build_defs/repo/git_worker.bzl
@@ -68,7 +68,7 @@
         fetch_ref = "tags/" + ctx.attr.tag + ":tags/" + ctx.attr.tag
     elif ctx.attr.branch:
         reset_ref = "origin/" + ctx.attr.branch
-        fetch_ref = ctx.attr.branch
+        fetch_ref = ctx.attr.branch + ":origin/" + ctx.attr.branch
 
     git_repo = _GitRepoInfo(
         directory = ctx.path(directory),