From f986ce13c93ce534ca38bad02b565812092854d3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 16 2015 13:39:15 +0000 Subject: If the pull-request is closed and there is only one commit in it, make sure we include it --- diff --git a/progit/ui/fork.py b/progit/ui/fork.py index 08832dc..043183c 100644 --- a/progit/ui/fork.py +++ b/progit/ui/fork.py @@ -119,9 +119,13 @@ def request_pull(repo, requestid, username=None): orig_repo.lookup_branch(request.branch).get_object().hex, pygit2.GIT_SORT_TIME) ] + if request.status is False: + commitid = request.commit_stop for commit in repo_obj.walk(commitid, pygit2.GIT_SORT_TIME): if request.status is False \ and commit.oid.hex == request.commit_start: + if request.commit_start == request.commit_stop: + diff_commits.append(commit) break elif request.status and commit.oid.hex in master_commits: break