Closed hazbo closed 8 years ago
Interesting. Definitely a question for Omar on his return.
Barbara
On Thu, Dec 24, 2015 at 2:43 AM, Harry Lawrence notifications@github.com wrote:
I'm receiving this error message https://github.com/google/git-appraise/blob/8876cfff2ed848d50cb559c05d44e11b95ca791c/repository/git.go#L171 rather frequently. I don't know in this case if I've been doing something dumb.
All I've done is simply clone git-appraise, pulled down reviews and tried to leave a comment. Upon leaving a comment I receive that particular error message.
/cc @ojarjur https://github.com/ojarjur
— Reply to this email directly or view it on GitHub https://github.com/google/git-appraise/issues/26.
I'm pretty sure I know what you are hitting, so let me explain:
Review requests mirrored from a GitHub pull requests wind up with a review ref of the form "refs/pull/
What I've done is add a refspec for fetching from GitHub that makes it recreate the pull refs locally. I.E.:
$ git config --list
....
remote.origin.url=git@github.com:google/git-appraise
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.fetch=+refs/pull/*:refs/pull/*
....
The code tries to be smart about remote refs for branches (so it will accept "refs/remotes/origin/ojarjur/mybranch" as an alternative to "refs/heads/ojarjur/mybranch"), but for pull requests (since they are not branches), the best we can do is just leave it up to the user to fetch them locally.
So, try the following and see if it fixes your issue:
git config --add remote.origin.fetch '+refs/pull/*:refs/pull/*'
Yeah that seemed to do the trick. Thank you for explaining.
I'm receiving this error message rather frequently. I don't know in this case if I've been doing something dumb.
All I've done is simply clone git-appraise, pulled down reviews and tried to leave a comment. Upon leaving a comment I receive that particular error message.
/cc @ojarjur