Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Local variables should not be declared and then immediately returned
Browse files Browse the repository at this point in the history
Signed-off-by:Matteo Baccan <[email protected]>
  • Loading branch information
matteobaccan committed Apr 21, 2021
1 parent 2cc698f commit c665ec9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/main/java/pl/project13/core/jgit/JGitCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,11 @@ public static boolean isRepositoryInDirtyState(Repository repo) throws GitAPIExc
// repo is dirty. JGit does this, so we cannot use the isClean method
// to get the same behaviour. Instead check dirty state without
// status.getUntracked().isEmpty()
boolean isDirty = !(status.getAdded().isEmpty()
return !(status.getAdded().isEmpty()
&& status.getChanged().isEmpty()
&& status.getRemoved().isEmpty()
&& status.getMissing().isEmpty()
&& status.getModified().isEmpty()
&& status.getConflicting().isEmpty());

return isDirty;
}
}

0 comments on commit c665ec9

Please sign in to comment.