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

92: GitRepository::currentBranch fails when on a detached HEAD #278

Closed
wants to merge 1 commit into from

Conversation

@edvbld
Copy link
Member

edvbld commented Nov 28, 2019

Hi all,

please review this pull request that makes git webrev work when the repository is in a "detached HEAD" state (i.e. there is no active branch). The main part of the change is making ReadOnlyRepository::currentBranch return Optional<Branch> instead of Branch.

Thanks,
Erik

Testing

  • make test on Linux x64
  • Manually running git webrev on a repository with a detached HEAD

Progress

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

Issue

SKARA-92: GitRepository::currentBranch fails when on a detached HEAD

Approvers

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 28, 2019

👋 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 (refresh this page to view it).

@openjdk openjdk bot added rfr cli labels Nov 28, 2019
@mlbridge
Copy link

mlbridge bot commented Nov 28, 2019

Webrevs

Copy link
Member

rwestberg left a comment

Looks good! Perhaps the error message could be made a bit more helpful, but not sure what it should say. :)

@openjdk openjdk bot removed the rfr label Nov 29, 2019
@openjdk
Copy link

openjdk bot commented Nov 29, 2019

@edvbld This change can now be integrated. The commit message will be:

92: GitRepository::currentBranch fails when on a detached HEAD

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To list additional contributors, use the /contributor 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 the above commits when integrating. If you prefer to do this manually, please merge master into your branch first.

  • To integrate this PR with the above commit message, type /integrate in a new comment.
@openjdk openjdk bot added the ready label Nov 29, 2019
@edvbld
Copy link
Member Author

edvbld commented Dec 2, 2019

/integrate

@openjdk openjdk bot closed this Dec 2, 2019
@openjdk openjdk bot added the integrated label Dec 2, 2019
@openjdk
Copy link

openjdk bot commented Dec 2, 2019

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

Your commit was automatically rebased without conflicts.

Pushed as commit 0fb118f.

@openjdk openjdk bot removed the ready label Dec 2, 2019
@mlbridge
Copy link

mlbridge bot commented Dec 2, 2019

Mailing list message from Erik Helin on skara-dev:

Changeset: 0fb118f
Author: Erik Helin <ehelin at openjdk.org>
Date: 2019-12-02 09:01:14 +0000
URL: https://git.openjdk.java.net/skara/commit/0fb118f0

92: GitRepository::currentBranch fails when on a detached HEAD

Reviewed-by: rwestberg

! cli/src/main/java/org/openjdk/skara/cli/GitPr.java
! cli/src/main/java/org/openjdk/skara/cli/GitPublish.java
! cli/src/main/java/org/openjdk/skara/cli/GitWebrev.java
! jcheck/src/test/java/org/openjdk/skara/jcheck/TestRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/ReadOnlyRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/git/GitRepository.java
! vcs/src/main/java/org/openjdk/skara/vcs/hg/HgRepository.java
! vcs/src/test/java/org/openjdk/skara/vcs/RepositoryTests.java

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.