Browse Source

Sujith :) ->
1. Fixed rename and delete functionality
2. Removed override references from arbitrator

sujith 1 month ago
parent
commit
f144f50afd

+ 13 - 2
Assets/Better Git/Arbitrator/Editor/Services/GitExecutors.cs

@@ -232,8 +232,19 @@ namespace Terra.Arbitrator.Services
                     var pathsToStage = new List<string>();
                     foreach (var change in changesToCommit)
                     {
-                        if (change.Status == ChangeKind.Deleted) Commands.Remove(repo, change.FilePath);
-                        else pathsToStage.Add(change.FilePath);
+                        switch (change.Status)
+                        {
+                            case ChangeKind.Deleted:
+                                Commands.Remove(repo, change.FilePath);
+                                break;
+                            case ChangeKind.Renamed:
+                                Commands.Remove(repo, change.OldFilePath);
+                                pathsToStage.Add(change.FilePath);
+                                break;
+                            default:
+                                pathsToStage.Add(change.FilePath);
+                                break;
+                        }
                     }
                     if (pathsToStage.Any()) Commands.Stage(repo, pathsToStage);
 

+ 2 - 2
Assets/Better Git/Arbitrator/Editor/Terra.Arbitrator.asmdef

@@ -9,12 +9,12 @@
     ],
     "excludePlatforms": [],
     "allowUnsafeCode": false,
-    "overrideReferences": true,
+    "overrideReferences": false,
     "precompiledReferences": [
         "LibGit2Sharp.dll",
         "CliWrap.dll"
     ],
-    "autoReferenced": false,
+    "autoReferenced": true,
     "defineConstraints": [],
     "versionDefines": [],
     "noEngineReferences": false