mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45:00 +00:00
refactor: do NOT use the --prune
parameter for git fetch
command (#590)
This commit is contained in:
parent
077e35b860
commit
b9d7f908c9
13 changed files with 7 additions and 27 deletions
|
@ -100,7 +100,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
SetProgressDescription("Fetching from added remote ...");
|
||||
new Commands.Config(_repo.FullPath).Set($"remote.{_name}.sshkey", _useSSH ? SSHKey : null);
|
||||
new Commands.Fetch(_repo.FullPath, _name, true, false, SetProgressDescription).Exec();
|
||||
new Commands.Fetch(_repo.FullPath, _name, false, SetProgressDescription).Exec();
|
||||
}
|
||||
CallUIThread(() =>
|
||||
{
|
||||
|
|
|
@ -22,12 +22,6 @@ namespace SourceGit.ViewModels
|
|||
set;
|
||||
}
|
||||
|
||||
public bool Prune
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
public bool NoTags
|
||||
{
|
||||
get => _repo.Settings.FetchWithoutTags;
|
||||
|
@ -53,13 +47,13 @@ namespace SourceGit.ViewModels
|
|||
foreach (var remote in _repo.Remotes)
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {remote.Name}");
|
||||
new Commands.Fetch(_repo.FullPath, remote.Name, Prune, NoTags, SetProgressDescription).Exec();
|
||||
new Commands.Fetch(_repo.FullPath, remote.Name, NoTags, SetProgressDescription).Exec();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {SelectedRemote.Name}");
|
||||
new Commands.Fetch(_repo.FullPath, SelectedRemote.Name, Prune, NoTags, SetProgressDescription).Exec();
|
||||
new Commands.Fetch(_repo.FullPath, SelectedRemote.Name, NoTags, SetProgressDescription).Exec();
|
||||
}
|
||||
|
||||
CallUIThread(() =>
|
||||
|
|
|
@ -147,7 +147,7 @@ namespace SourceGit.ViewModels
|
|||
if (FetchAllBranches)
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {_selectedRemote.Name}...");
|
||||
rs = new Commands.Fetch(_repo.FullPath, _selectedRemote.Name, false, NoTags, SetProgressDescription).Exec();
|
||||
rs = new Commands.Fetch(_repo.FullPath, _selectedRemote.Name, NoTags, SetProgressDescription).Exec();
|
||||
if (!rs)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -2114,7 +2114,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
IsAutoFetching = true;
|
||||
Dispatcher.UIThread.Invoke(() => OnPropertyChanged(nameof(IsAutoFetching)));
|
||||
new Commands.Fetch(_fullpath, "--all", true, false, null) { RaiseError = false }.Exec();
|
||||
new Commands.Fetch(_fullpath, "--all", false, null) { RaiseError = false }.Exec();
|
||||
_lastFetchTime = DateTime.Now;
|
||||
IsAutoFetching = false;
|
||||
Dispatcher.UIThread.Invoke(() => OnPropertyChanged(nameof(IsAutoFetching)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue