#2357 Create references for pull-request in the git repo for local checkout
Merged by pingou. Opened by pingou.
local_pr  into  master

Download 2357.patch

This will allow checking out locally a PR opened against a given project
without having to add and manage a new remote.

One note: while existing clone will not get the objects coming from the
fork, new clones will download them, so git show will find the commits
coming from forks even though they are not merged and even if the user
did not fetch the corresponding pull/ references.

Fixes https://pagure.io/pagure/issue/443

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

This could simplify the script in pag#15.

2 new commits added

  • Add small docstring explaining why the test raises an exception
  • Add unit-test checking that the ref is created when viewing a PR

I don't think this is needed here.

A minor comment on the test, otherwise looks good :thumbsup:

I'm surprised since set_up_git_repo below creates a new PR, but testing seems to agree with you. I'll remove this :)

3 new commits added

  • Add small docstring explaining why the test raises an exception
  • Add unit-test checking that the ref is created when viewing a PR
  • Create references for pull-request in the git repo for local checkout

rebased

Tests are now all passing (there was one flake8 I had to fix) and the mock has been removed.

Thanks for the review!

Pull-Request has been merged by pingou

Metadata