/** @return True if we have a valid git repo. */ protected boolean hasSourceRepository() { return getSourceRepository() != null; } }
@Override public void run() { repoState.getSourceRepository().update(); if (!targetStash.isNull()) { unstash(project, targetStash, root); } } });
/** Refresh the repository files. */ @SuppressWarnings("ConstantConditions") public void hardRefresh() { if (repoState.hasSourceRepository()) { List<VirtualFile> list = VfsUtil.markDirty(true, true, repoState.getSourceRepository().getRoot()); if (!list.isEmpty()) { LocalFileSystem.getInstance().refreshFiles(list, false, true, null); } } }
assert repoState.getSourceRepository() != null; final VirtualFile root = repoState.getSourceRepository().getRoot(); repoState.getOriginalBranchName(), false, Collections.singletonList(repoState.getSourceRepository()), new Runnable() { @Override
@NotNull final Ref<StashInfo> targetStash, @NotNull final VirtualFile root) { if (repoState.getSourceRepository() == null || repoState.getOriginalBranchName() == null || (!repoState .getOriginalBranchName() .equals(repoState.getSourceRepository().getCurrentBranchName()) && !repoState .getOriginalBranchName() .equals(repoState.getSourceRepository().getCurrentRevision()))) { Messages.showErrorDialog( StackdriverDebuggerBundle.getString(