TFS fail to merge branches
See original GitHub issueError: “Pull request cannot be automatically merged.”
Further investigation shows:
UserAgent TFS JobAgent(TfsJobAgent.exe, 15.117.26714.0)
ExceptionType LibGit2Sharp.LibGit2SharpException
Message LibGit2Sharp.LibGit2SharpException: TF401022: By policy, the Git object ‘49c782016d305ee3d24f8a98fd549d815fc1ceb5’ is too large to materialize into memory. Its size, 202478760, exceeds the threshold of 104857600 bytes. at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) at LibGit2Sharp.Core.Proxy.git_merge_commits(RepositoryHandle repo, ObjectHandle ourCommit, ObjectHandle theirCommit, GitMergeOpts opts, Boolean& earlyStop) at LibGit2Sharp.ObjectDatabase.MergeCommits(Commit ours, Commit theirs, MergeTreeOptions options) at Microsoft.TeamFoundation.Git.Server.Native.LibGit2NativeLibrary.CreateMergeWithConflictTracking(Sha1Id mergeSourceCommitId, Sha1Id mergeTargetCommitId, CommitDetails commitDetails, Boolean findRenames, Int32 renameThreshold, Int32 targetLimit, IEnumerable`1 parentIdsForMergeCommit, CustomerIntelligenceData ciData)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
No, it is not a bug in the library. The library absolutely supports merging large files. You can feel free to try it out and see.
This is a limitation in TFS: it is not a bug in TFS, it is by design. Trying to merge very large files could exhaust memory and lead to a denial of service attack. It is explicitly disabled. I can assure you that this is true, because I added this limitation to TFS.
Thank you very much, Edward! Your answer was detailed and precise.