mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: supports to configure fetch.prune
for selected repository (#995)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
b5feabfd37
commit
9da2c787db
2 changed files with 15 additions and 2 deletions
|
@ -60,6 +60,12 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _httpProxy, value);
|
||||
}
|
||||
|
||||
public bool EnablePruneOnFetch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool EnableAutoFetch
|
||||
{
|
||||
get => _repo.Settings.EnableAutoFetch;
|
||||
|
@ -153,6 +159,8 @@ namespace SourceGit.ViewModels
|
|||
GPGUserSigningKey = signingKey;
|
||||
if (_cached.TryGetValue("http.proxy", out var proxy))
|
||||
HttpProxy = proxy;
|
||||
if (_cached.TryGetValue("fetch.prune", out var prune))
|
||||
EnablePruneOnFetch = (prune == "true");
|
||||
}
|
||||
|
||||
public void ClearHttpProxy()
|
||||
|
@ -286,6 +294,7 @@ namespace SourceGit.ViewModels
|
|||
SetIfChanged("tag.gpgsign", GPGTagSigningEnabled ? "true" : "false", "false");
|
||||
SetIfChanged("user.signingkey", GPGUserSigningKey, "");
|
||||
SetIfChanged("http.proxy", HttpProxy, "");
|
||||
SetIfChanged("fetch.prune", EnablePruneOnFetch ? "true" : "false", "false");
|
||||
}
|
||||
|
||||
private void SetIfChanged(string key, string value, string defValue)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue