PullConflictSource.cs 703 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2025 TerraByte Inc.
  2. //
  3. // An implementation of IConflictSource specifically for handling conflicts
  4. // that arise from a 'git pull' operation.
  5. using Terra.Arbitrator.Promises;
  6. using System.Collections.Generic;
  7. namespace Terra.Arbitrator.Services
  8. {
  9. /// <summary>
  10. /// Handles the resolution of conflicts from a git pull.
  11. /// </summary>
  12. public class PullConflictSource : IConflictSource
  13. {
  14. public string MineLabel => "Your Local Changes";
  15. public string TheirsLabel => "Incoming Remote Changes";
  16. public IPromise<string> Resolve(List<GitChange> resolutions)
  17. {
  18. return GitService.PullAndOverwrite(resolutions);
  19. }
  20. }
  21. }