Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-pr: do not assume a master branch #415

wants to merge 4 commits into from


Copy link

@edvbld edvbld commented Feb 7, 2020

Hi all,

please review this patch that makes git pr work even though no master branch
is present (which is the case if you clone a repository that uses a different
default branch). The fix consists of two parts:

  • Use a better algorithm for detecting the target branch. git pr create will
    now pick the "closest" branch that exists in the upstream (parent) repository
    as the target branch by default.
  • Read the .jcheck/conf file from the target branch


  • Manually tested git pr create on different repositories on Linux x64



  • Change must not contain extraneous whitespace
  • Change must be properly reviewed


Copy link

@bridgekeeper bridgekeeper bot commented Feb 7, 2020

👋 Welcome back ehelin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

Copy link

@mlbridge mlbridge bot commented Feb 7, 2020


Copy link

@rwestberg rwestberg left a comment

Looks good!

Copy link

@openjdk openjdk bot commented Feb 10, 2020

@edvbld This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

git-pr: do not assume a master branch

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there has been 1 commit pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 27af764dd4f5bb8bee2f0c228e0138165e48d593.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Feb 10, 2020
Copy link
Member Author

@edvbld edvbld commented Feb 10, 2020


@openjdk openjdk bot closed this Feb 10, 2020
@openjdk openjdk bot added integrated and removed ready labels Feb 10, 2020
Copy link

@openjdk openjdk bot commented Feb 10, 2020

@edvbld The following commits have been pushed to master since your change was applied:

  • 27af764: Remove unnecessary merge test

Your commit was automatically rebased without conflicts.

Pushed as commit 4637c1b.

@openjdk openjdk bot removed the rfr label Feb 10, 2020
Copy link

@mlbridge mlbridge bot commented Feb 10, 2020

Mailing list message from Erik Helin on skara-dev:

Changeset: 4637c1b
Author: Erik Helin <ehelin at>
Date: 2020-02-10 09:42:02 +0000

git-pr: do not assume a master branch

Reviewed-by: rwestberg

! cli/src/main/java/org/openjdk/skara/cli/
! vcs/src/main/java/org/openjdk/skara/vcs/
! vcs/src/main/java/org/openjdk/skara/vcs/git/
! vcs/src/main/java/org/openjdk/skara/vcs/hg/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants