IJPL-174576 git: try to fix outdated Editor content after interactive rebase

GitOrigin-RevId: 85e618976c19f935b1f4233b287306ee3eff596c
This commit is contained in:
Aleksey Pivovarov
2025-01-03 17:55:30 +00:00
committed by intellij-monorepo-bot
parent fb4f988b7e
commit fcd9de0e29
@@ -5,6 +5,7 @@ import com.intellij.dvcs.DvcsUtil;
import com.intellij.dvcs.repo.RepoStateException;
import com.intellij.dvcs.repo.Repository;
import com.intellij.dvcs.repo.VcsRepositoryManager;
import com.intellij.ide.SaveAndSyncHandler;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.Task;
@@ -960,6 +961,10 @@ public final class GitUtil {
}
else {
RefreshVFsSynchronously.updateChanges(changes);
// the file opened in the editor may accidentally capture an intermediate state for back-and-forth changes during rebase
// these may not be refreshed if 'before rebase' and 'after rebase' states match for the file
SaveAndSyncHandler.getInstance().refreshOpenFiles();
}
}