Skip to content

Commit

Permalink
fix cancellation token declaration
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Seibt <36601201+mstv@users.noreply.github.com>
  • Loading branch information
pmiossec and mstv committed Sep 14, 2023
1 parent 10f1e4c commit 9983162
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GitCommands/Git/GitModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2162,9 +2162,10 @@ public IReadOnlyList<PatchFile> GetInteractiveRebasePatchFiles()
bool isCurrentFound = false;

RevisionReader reader = new(this, hasReflogSelector: false, allBodies: true);
CancellationTokenSource cts = new(TimeSpan.FromSeconds(30));
Dictionary<string, GitRevision> rebasedCommitsRevisions;

try
{
using CancellationTokenSource cts = new(TimeSpan.FromSeconds(30));
try
{
rebasedCommitsRevisions = reader.GetRevisionsFromRange(todoCommitsInfos[0][1], todoCommitsInfos[^1][1], cts.Token)
Expand Down

0 comments on commit 9983162

Please sign in to comment.