From 241069ddac7881ca814ff48aaabe284b7080a13e Mon Sep 17 00:00:00 2001 From: "R. Martinho Fernandes" Date: Sun, 11 Sep 2016 05:42:41 +0200 Subject: [PATCH] Make git-pr set up branch for pulling (#570) With these changes, the pr/nn branches created by git-pr also support `git pull` to get PR updates. --- bin/git-pr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/git-pr b/bin/git-pr index a7e1fdf..ede1d85 100755 --- a/bin/git-pr +++ b/bin/git-pr @@ -16,4 +16,7 @@ else id=$1 branch=pr/$id fi -git fetch -fu $remote refs/pull/$id/head:$branch && git checkout $branch +git fetch -fu $remote refs/pull/$id/head:$branch && \ +git checkout $branch && \ +git config --local --replace branch.\"$branch\".merge refs/pull/$id/head && \ +git config --local --replace branch.\"$branch\".remote $remote;