mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
enhance: Git LFS supports (#209)
* add a new context menu to push local LFS object to selected remote * supports to choose remote for fetch/pull/push/lock/unlock actions * auto select remote if there's only one remote
This commit is contained in:
parent
f18ecf53eb
commit
0c21bcd06a
14 changed files with 359 additions and 59 deletions
|
@ -1,12 +1,22 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class LFSFetch : Popup
|
||||
{
|
||||
public List<Models.Remote> Remotes => _repo.Remotes;
|
||||
|
||||
public Models.Remote SelectedRemote
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public LFSFetch(Repository repo)
|
||||
{
|
||||
_repo = repo;
|
||||
SelectedRemote = _repo.Remotes[0];
|
||||
View = new Views.LFSFetch() { DataContext = this };
|
||||
}
|
||||
|
||||
|
@ -16,7 +26,7 @@ namespace SourceGit.ViewModels
|
|||
ProgressDescription = $"Fetching LFS objects from remote ...";
|
||||
return Task.Run(() =>
|
||||
{
|
||||
new Commands.LFS(_repo.FullPath).Fetch(SetProgressDescription);
|
||||
new Commands.LFS(_repo.FullPath).Fetch(SelectedRemote.Name, SetProgressDescription);
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue