Skip to content

Commit

Permalink
Merge pull request #8533 from pmiossec/warning_bckg_fetch_force_with_…
Browse files Browse the repository at this point in the history
…lease
  • Loading branch information
RussKie committed Oct 12, 2020
2 parents daa7ce1 + f8f0265 commit 99df5a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Plugins/BackgroundFetch/BackgroundFetchPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public BackgroundFetchPlugin() : base(true)
private IDisposable _cancellationToken;
private IGitUICommands _currentGitUiCommands;

private readonly PseudoSetting _warningForceWithLease = new PseudoSetting("WARNING: be careful when force push with lease having the periodic background fetch enabled but chose not to auto-refresh after each fetch.\r\n\r\nYou could lose new commits pushed by others to the remote branch.\r\n\r\nBe sure to refresh the revision grid before doing a force push with lease.", textboxSettings: tb =>
{
tb.Multiline = true;
tb.Height = 500;
});
private readonly StringSetting _gitCommand = new StringSetting("Arguments of git command to run", "fetch --all");
private readonly NumberSetting<int> _fetchInterval = new NumberSetting<int>("Fetch every (seconds) - set to 0 to disable", 0);
private readonly BoolSetting _autoRefresh = new BoolSetting("Refresh view after fetch", false);
Expand All @@ -37,6 +42,7 @@ public override IEnumerable<ISetting> GetSettings()
yield return _fetchInterval;
yield return _autoRefresh;
yield return _fetchAllSubmodules;
yield return _warningForceWithLease;
}

public override void Register(IGitUICommands gitUiCommands)
Expand Down

0 comments on commit 99df5a6

Please sign in to comment.