Update repo.go to clone specific branch for PR
This commit is contained in:
parent
db85b952eb
commit
3223f4772a
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ func (r *Repo) Commands() []string {
|
|||
cmds := []string{}
|
||||
if len(r.PR) > 0 {
|
||||
// If a specific PR is provided then we need to clone it.
|
||||
cmds = append(cmds, fmt.Sprintf("git clone --depth=%d --recursive %s %s", r.Depth, r.Path, r.Dir))
|
||||
cmds = append(cmds, fmt.Sprintf("git clone --depth=%d --recursive --branch=%s %s %s", r.Depth, branch, r.Path, r.Dir))
|
||||
cmds = append(cmds, fmt.Sprintf("git fetch origin +refs/pull/%s/head:refs/remotes/origin/pr/%s", r.PR, r.PR))
|
||||
cmds = append(cmds, fmt.Sprintf("git checkout -qf -b pr/%s origin/pr/%s", r.PR, r.PR))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue