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

Commit e590eb4

Browse files
committed
add MaxAmountOfModificationsToFetch to git SourceControl. Default set to 100 to prevent large mods on first checkout.
1 parent 9999ea2 commit e590eb4

File tree

2 files changed

+457
-437
lines changed

2 files changed

+457
-437
lines changed

project/UnitTests/Core/SourceControl/GitTest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class GitTest : ProcessExecutorTestFixtureBase
2424
const string GIT_COMMIT_KEY = "commit";
2525
const string FROM_COMMIT = "0123456789abcdef";
2626
const string TO_COMMIT = "fedcba9876543210";
27-
const string GIT_LOG_OPTIONS = "--name-status --pretty=format:\"Commit:%H%nTime:%ci%nAuthor:%an%nE-Mail:%ae%nMessage:%s%n%n%b%nChanges:\" -m";
27+
const string GIT_LOG_OPTIONS = "-100 --name-status --pretty=format:\"Commit:%H%nTime:%ci%nAuthor:%an%nE-Mail:%ae%nMessage:%s%n%n%b%nChanges:\" -m";
2828
const string GIT_LOG_REMOTE_COMMITS = "log " + FROM_COMMIT + "..origin/master " + GIT_LOG_OPTIONS;
2929
const string GIT_LOG_ALL = "log origin/master " + GIT_LOG_OPTIONS;
3030

@@ -71,6 +71,7 @@ public void PopulateFromFullySpecifiedXml()
7171
<tagOnSuccess>true</tagOnSuccess>
7272
<commitBuildModifications>true</commitBuildModifications>
7373
<commitUntrackedFiles>true</commitUntrackedFiles>
74+
<maxAmountOfModificationsToFetch>500</maxAmountOfModificationsToFetch>
7475
<autoGetSource>true</autoGetSource>
7576
<tagCommitMessage>CCNet Test Build {0}</tagCommitMessage>
7677
<tagNameFormat>{0}</tagNameFormat>
@@ -92,6 +93,8 @@ public void PopulateFromFullySpecifiedXml()
9293
Assert.AreEqual("[email protected]", git.CommitterEMail, "#B11");
9394
Assert.AreEqual(true, git.CommitBuildModifications, "#B12");
9495
Assert.AreEqual(true, git.CommitUntrackedFiles, "#B13");
96+
Assert.AreEqual(500, git.MaxAmountOfModificationsToFetch, "#B14");
97+
9598
}
9699

97100
[Test]
@@ -115,6 +118,7 @@ public void PopulateFromMinimallySpecifiedXml()
115118
Assert.AreEqual(null, git.CommitterEMail, "#C11");
116119
Assert.AreEqual(false, git.CommitBuildModifications, "#C12");
117120
Assert.AreEqual(false, git.CommitUntrackedFiles, "#C13");
121+
Assert.AreEqual(100, git.MaxAmountOfModificationsToFetch, "#C14");
118122
}
119123

120124
[Test]

0 commit comments

Comments
 (0)