Пример #1
0
        public GitLfsManager(GitManager gitManager, GitCallbacks gitCallbacks)
        {
            this.gitManager                = gitManager;
            this.gitCallbacks              = gitCallbacks;
            gitCallbacks.UpdateRepository += OnUpdateRepository;
            gitManager.AddSettingsAffector(this);

            try
            {
                version     = GitHelper.RunExeOutput(gitManager.RepoPath, "git-lfs", "version", null);
                isInstalled = true;
            }
            catch (Exception)
            {
                isInstalled = false;
                return;
            }

            UpdateInitilized();
            if (Initilized)
            {
                RegisterFilter();
                Update();
            }
        }
Пример #2
0
 public void Untrack(string extension)
 {
     try
     {
         string output = GitHelper.RunExeOutput(gitManager.GetCurrentRepoPath(), "git-lfs", string.Format("track \"*{0}\"", extension), null);
         EditorUtility.DisplayDialog("Untrack File", output, "Ok");
     }
     catch (Exception e)
     {
         logger.Log(LogType.Error, "There was a problem while trying to untrack an extension");
         logger.LogException(e);
     }
 }
Пример #3
0
 public static void Track(string extension)
 {
     try
     {
         string output = GitHelper.RunExeOutput("git-lfs", string.Format("track \"*{0}\"", extension), null);
         EditorUtility.DisplayDialog("Track File", output, "Ok");
     }
     catch (Exception e)
     {
         Debug.LogErrorFormat("There was a problem while trying to track an extension");
         Debug.LogException(e);
     }
 }
Пример #4
0
        public static bool Initialize()
        {
            string output = GitHelper.RunExeOutput("git-lfs", "install", null);

            if (!Directory.Exists(GitManager.RepoPath + "\\.git\\lfs"))
            {
                Debug.LogError("Git-LFS install failed! (Try manually)");
                Debug.LogError(output);
                return(false);
            }
            EditorUtility.DisplayDialog("Git LFS Initialized", output, "Ok");
            return(true);
        }
Пример #5
0
        public bool Initialize()
        {
            string output = GitHelper.RunExeOutput(gitManager.GetCurrentRepoPath(), "git-lfs", "install", null);

            if (!Directory.Exists(UniGitPathHelper.Combine(gitManager.GetCurrentDotGitFolder(), "lfs")))
            {
                logger.Log(LogType.Error, "Git-LFS install failed! (Try manually)");
                logger.Log(LogType.Error, output);
                return(false);
            }
            EditorUtility.DisplayDialog("Git LFS Initialized", output, "Ok");
            UpdateInitilized();
            return(true);
        }
Пример #6
0
        public bool Initialize()
        {
            string output = GitHelper.RunExeOutput(gitManager.RepoPath, "git-lfs", "install", null);

            if (!Directory.Exists(UniGitPath.Combine(gitManager.RepoPath, ".git", "lfs")))
            {
                Debug.LogError("Git-LFS install failed! (Try manually)");
                Debug.LogError(output);
                return(false);
            }
            EditorUtility.DisplayDialog("Git LFS Initialized", output, "Ok");
            UpdateInitilized();
            return(true);
        }
Пример #7
0
        internal static void Load()
        {
            try
            {
                version     = GitHelper.RunExeOutput("git-lfs", "version", null);
                isInstalled = true;
            }
            catch (Exception)
            {
                isInstalled = false;
                return;
            }

            if (CheckInitialized())
            {
                RegisterFilter();
                Update();
            }
        }