[git] minor: inline parameter that is always null
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Sat, 8 Oct 2016 17:41:13 +0000 (20:41 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Tue, 11 Oct 2016 16:32:30 +0000 (19:32 +0300)
plugins/git4idea/src/git4idea/diff/GitDiffProvider.java
plugins/git4idea/src/git4idea/history/GitHistoryUtils.java

index 346be2c3412cf1d958fcb77dd6fad7f015de3017..2dfc92d3bef295b205228a5a818050fbf1ce82f0 100644 (file)
@@ -98,7 +98,7 @@ public class GitDiffProvider implements DiffProvider, DiffMixin {
       return null;
     }
     try {
-      return GitHistoryUtils.getCurrentRevisionDescription(myProject, VcsUtil.getFilePath(file.getPath()), null);
+      return GitHistoryUtils.getCurrentRevisionDescription(myProject, VcsUtil.getFilePath(file.getPath()));
     }
     catch (VcsException e) {
       return null;
index 2106560096e0a00d169d638a7d99e84b65f4909a..4fc4042e214d5b59edba97c3c4c869edd2b06d3b 100644 (file)
@@ -112,19 +112,14 @@ public class GitHistoryUtils {
   }
 
   @Nullable
-  public static VcsRevisionDescription getCurrentRevisionDescription(final Project project, FilePath filePath, @Nullable String branch)
+  public static VcsRevisionDescription getCurrentRevisionDescription(final Project project, FilePath filePath)
     throws VcsException {
     filePath = getLastCommitName(project, filePath);
     GitSimpleHandler h = new GitSimpleHandler(project, GitUtil.getGitRoot(filePath), GitCommand.LOG);
     GitLogParser parser = new GitLogParser(project, HASH, COMMIT_TIME, AUTHOR_NAME, COMMITTER_NAME, SUBJECT, BODY, RAW_BODY);
     h.setSilent(true);
     h.addParameters("-n1", parser.getPretty());
-    if (branch != null && !branch.isEmpty()) {
-      h.addParameters(branch);
-    }
-    else {
-      h.addParameters("--all");
-    }
+    h.addParameters("--all");
     h.endOptions();
     h.addRelativePaths(filePath);
     String result = h.run();