123456789101112131415161718192021222324252627282930313233343536373839 |
- // Copyright (c) 2025 TerraByte Inc.
- //
- // This script defines the data model for a single Git change.
- // An object of this class holds information about a file that has been
- // added, modified, or deleted.
- using LibGit2Sharp;
- using UnityEngine.Scripting;
- namespace Terra.Arbitrator.Services
- {
- /// <summary>
- /// A data container for a single file change detected by Git.
- /// </summary>
- [Preserve]
- public class GitChange
- {
- public string FilePath { get; private set; }
- public string OldFilePath { get; private set; }
- public ChangeKind Status { get; private set; }
- public bool IsSelectedForCommit { get; set; }
- public ConflictResolution Resolution { get; set; } = ConflictResolution.None;
- public GitChange(string newPath, string oldPath, ChangeKind status)
- {
- FilePath = newPath;
- OldFilePath = oldPath;
- Status = status;
- IsSelectedForCommit = true;
- }
- public enum ConflictResolution
- {
- None,
- Mine,
- Theirs
- }
- }
- }
|