question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TFS fail to merge branches

See original GitHub issue

Error: “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:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ethomsoncommented, Aug 29, 2017

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.

1reaction
rerimecommented, Aug 29, 2017

Thank you very much, Edward! Your answer was detailed and precise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TFS fail to merge branches TF401022
This is a deliberate design decision to keep TFS from consuming runaway resources during a merge. As Ed mentioned in the linked GitHub...
Read more >
TFS merge Error with directory that no longer exists ...
The problem occurs when trying to merge the branch back into the main project. I get a Source Control merge wizard error (TF14078)...
Read more >
Error: Fail to create remote branch ref file · Issue #982
I am in the process of migrating a TFVC repository to a git repository and I am running into an issue. The TFS...
Read more >
Branching in TFS — How Does it Work
When branching and merging changes from development and main branches, TFS does not also consider prior merges (merge history). For example:.
Read more >
Git branch policies and settings - Azure Repos
Azure Repos has several merge strategies, and by default, all of them are allowed. You can maintain a consistent branch history by enforcing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found