From e990b69efad262ffa79640857c57bb0b82a0418d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 04 2014 14:51:27 +0000 Subject: If a branch is specified and no commit id, use that branch to diff against --- diff --git a/progit/fork.py b/progit/fork.py index 166b925..95b15b8 100644 --- a/progit/fork.py +++ b/progit/fork.py @@ -332,6 +332,10 @@ def new_request_pull(repo, username=None, commitid=None): if commitid is None: commitid = repo_obj.head.target + branchname = flask.request.args.get('branch', None) + if branchname: + branch = repo_obj.lookup_branch(branchname) + commitid = branch.get_object().hex diff_commits = [] diffs = []