IDEA-365609 "Share on GitHub" doesn't commit files properly

save settings after git repo initialization to ensure vcs.xml is updated

GitOrigin-RevId: 8429b81dc864ae2661569617a227f8973abb21dc
This commit is contained in:
Dmitry Avdeev
2025-01-31 18:18:51 +00:00
committed by intellij-monorepo-bot
parent 145512288c
commit cf83c96ca2
@@ -76,9 +76,6 @@ object GHShareProjectUtil {
root: VirtualFile,
projectName: @NlsSafe String) {
FileDocumentManager.getInstance().saveAllDocuments()
runWithModalProgressBlocking(project, IdeBundle.message("progress.saving.project", project.name)) {
saveSettings(project)
}
val possibleRemotes = gitRepository
?.let(project.service<GHHostedRepositoriesManager>()::findKnownRepositories)
@@ -235,6 +232,12 @@ object GHShareProjectUtil {
return true
}
invokeAndWaitIfNeeded(indicator.modalityState) {
runWithModalProgressBlocking(project, IdeBundle.message("progress.saving.project", project.name)) {
saveSettings(project, forceSavingAllSettings = true)
}
}
LOG.info("Trying to commit")
try {
LOG.info("Adding files for commit")