git4idea: IDEA-57066: fixed non-tag commit dectection

This commit is contained in:
Constantine Plotnikov
2010-08-03 16:22:08 +04:00
parent 005d194d73
commit 4565e2a473
@@ -586,9 +586,9 @@ public class GitBranchConfigurations implements PersistentStateComponent<GitBran
if (LOG.isDebugEnabled()) {
LOG.debug("describe HEAD failed for root: " + root.getPath());
}
GitSimpleHandler h = new GitSimpleHandler(myProject, root, GitCommand.SHOW);
GitSimpleHandler h = new GitSimpleHandler(myProject, root, GitCommand.LOG);
h.setNoSSH(true);
h.addParameters("--pretty=format:%H", "HEAD");
h.addParameters("-n1", "--pretty=format:%H", "HEAD");
try {
return h.run().trim();
}
@@ -601,7 +601,7 @@ public class GitBranchConfigurations implements PersistentStateComponent<GitBran
/**
* Detect possible configurations
*
* @param roots
* @param roots the vcs roots used to detect configuraitons
* @return a sorted list of branches
* @throws VcsException if there is a problem with running git
*/