Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 9999ea2

Browse files
askrinnikRubenWillems
authored andcommitted
If a repository has a lot of commit this operation processes long time and a project is aborted due to timeout. It is necessary to limit history reading to 100 last commits
1 parent cc325b1 commit 9999ea2

File tree

1 file changed

+2
-0
lines changed
  • project/core/sourcecontrol

1 file changed

+2
-0
lines changed

project/core/sourcecontrol/Git.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ private ProcessResult GitLogHistory(string branchName, string from, IIntegration
494494
ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
495495
buffer.AddArgument("log");
496496
buffer.AddArgument(string.Concat(from, "..origin/", branchName));
497+
buffer.AddArgument("-100"); // The history may be very long. It may lead to timeout. That's why we need to limit it
497498
AppendLogOptions(buffer);
498499
return Execute(NewProcessInfo(buffer.ToString(), to));
499500
}
@@ -503,6 +504,7 @@ private ProcessResult GitLogHistory(string branchName, IIntegrationResult to)
503504
ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
504505
buffer.AddArgument("log");
505506
buffer.AddArgument(string.Concat("origin/", branchName));
507+
buffer.AddArgument("-100"); // The history may be very long. It may lead to timeout. That's why we need to limit it
506508
AppendLogOptions(buffer);
507509
return Execute(NewProcessInfo(buffer.ToString(), to));
508510
}

0 commit comments

Comments
 (0)