-
Notifications
You must be signed in to change notification settings - Fork 102
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
Adding "Reset to here" action in patch set context menu #416
base: intellij14
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this! I've added some minor comment. Will test it once these fixed have been cleaned up.
src/main/java/com/urswolfer/intellij/plugin/gerrit/git/GerritGitUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/com/urswolfer/intellij/plugin/gerrit/git/GerritGitUtil.java
Show resolved
Hide resolved
src/main/java/com/urswolfer/intellij/plugin/gerrit/ui/action/ResetAction.java
Outdated
Show resolved
Hide resolved
src/main/java/com/urswolfer/intellij/plugin/gerrit/ui/action/ResetAction.java
Outdated
Show resolved
Hide resolved
@brownian-motion: Do you think you will find the time to implement my comments? |
Hello, and thanks for looking at this PR so closely! I apologize for taking so long to reply @uwolfer . I'd be happy to implement these changes, and will submit a new commit soon! |
@@ -426,6 +427,18 @@ public GitLineHandler compute() { | |||
} | |||
} | |||
|
|||
public Optional<VcsFullCommitDetails> loadGitCommitInfo(Project project, GitRepository gitRepository, ChangeInfo changeInfo) throws VcsException { | |||
List<GitCommit> history = GitHistoryUtils.history(project, gitRepository.getRoot(), changeInfo.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeInfo.id
does not work in my case, it is not a git commit hash.
You can take a look at gerritUtil.getFirstFetchInfo(changeDetails);
@@ -426,6 +427,18 @@ public GitLineHandler compute() { | |||
} | |||
} | |||
|
|||
public Optional<VcsFullCommitDetails> loadGitCommitInfo(Project project, GitRepository gitRepository, ChangeInfo changeInfo) throws VcsException { | |||
List<GitCommit> history = GitHistoryUtils.history(project, gitRepository.getRoot(), changeInfo.id); | |||
if (history.isEmpty()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space before {
(here and in other new code places).
@brownian-motion: Do you plan to update this PR? |
No description provided.