mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NPE for git log when no tracked branch is specified
This commit is contained in:
@@ -120,8 +120,8 @@ public class LowLevelAccessImpl implements LowLevelAccess {
|
||||
refs.setCurrent(current);
|
||||
if (current != null) {
|
||||
GitBranch tracked = current.tracked(myProject, myRoot);
|
||||
String fullName = tracked.getFullName();
|
||||
fullName = fullName.startsWith(GitBranch.REFS_REMOTES_PREFIX) ? fullName.substring(GitBranch.REFS_REMOTES_PREFIX.length()) : fullName;
|
||||
String fullName = tracked == null ? null : tracked.getFullName();
|
||||
fullName = fullName != null && fullName.startsWith(GitBranch.REFS_REMOTES_PREFIX) ? fullName.substring(GitBranch.REFS_REMOTES_PREFIX.length()) : fullName;
|
||||
refs.setTrackedRemote(fullName);
|
||||
}
|
||||
refs.setUsername(GitConfigUtil.getValue(myProject, myRoot, GitConfigUtil.USER_NAME));
|
||||
|
||||
Reference in New Issue
Block a user