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(); } }
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); } }
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); } }
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); }
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); }
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); }
internal static void Load() { try { version = GitHelper.RunExeOutput("git-lfs", "version", null); isInstalled = true; } catch (Exception) { isInstalled = false; return; } if (CheckInitialized()) { RegisterFilter(); Update(); } }