Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
b6632f6d
Commit
b6632f6d
authored
6 years ago
by
Kirill Likhodedov
Browse files
Options
Download
Email Patches
Plain Diff
~~~ TEMP CHANGE, TO BE REMOVED BEFORE MERGE
parent
800594db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/git4idea/src/git4idea/actions/GitFetch.java
+16
-2
plugins/git4idea/src/git4idea/actions/GitFetch.java
with
16 additions
and
2 deletions
+16
-2
plugins/git4idea/src/git4idea/actions/GitFetch.java
+
16
-
2
View file @
b6632f6d
...
...
@@ -7,11 +7,18 @@ import com.intellij.openapi.progress.ProgressIndicator;
import
com.intellij.openapi.progress.Task
;
import
com.intellij.openapi.project.DumbAwareAction
;
import
com.intellij.openapi.project.Project
;
import
com.intellij.openapi.vcs.ProjectLevelVcsManager
;
import
com.intellij.openapi.vcs.VcsException
;
import
com.intellij.openapi.vfs.VirtualFile
;
import
git4idea.GitVcs
;
import
git4idea.commands.Git
;
import
git4idea.stash.GitShelveChangesSaver
;
import
org.jetbrains.annotations.NotNull
;
import
java.util.Collection
;
import
static
git4idea
.
GitUtil
.
getRepositories
;
import
static
git4idea
.
fetch
.
GitFetchSupport
.
fetchSuppor
t
;
import
static
java
.
util
.
Arrays
.
asLis
t
;
public
class
GitFetch
extends
DumbAwareAction
{
...
...
@@ -34,7 +41,14 @@ public class GitFetch extends DumbAwareAction {
GitVcs
.
runInBackground
(
new
Task
.
Backgroundable
(
project
,
"Fetching..."
,
true
)
{
@Override
public
void
run
(
@NotNull
ProgressIndicator
indicator
)
{
fetchSupport
(
project
).
fetchAllRemotes
(
getRepositories
(
project
)).
showNotification
();
Collection
<
VirtualFile
>
roots
=
asList
(
ProjectLevelVcsManager
.
getInstance
(
project
).
getAllVersionedRoots
());
try
{
new
GitShelveChangesSaver
(
project
,
Git
.
getInstance
(),
indicator
,
myTitle
).
saveLocalChanges
(
roots
);
}
catch
(
VcsException
ex
)
{
ex
.
printStackTrace
();
}
//fetchSupport(project).fetchAllRemotes(getRepositories(project)).showNotification();
}
});
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help