private void PostprocessStage(string[] paths) { if (repository == null || !IsValidRepo) { return; } if (prefs.GetBool(UnityEditorGitPrefs.DisablePostprocess)) { return; } string[] pathsFinal = paths.Where(a => !IsEmptyFolder(a)).SelectMany(GetPathWithMeta).ToArray(); if (pathsFinal.Length > 0) { bool autoStage = gitSettings != null && gitSettings.AutoStage; if (Threading.IsFlagSet(GitSettingsJson.ThreadingType.Stage)) { if (autoStage) { AsyncStage(pathsFinal); } else { MarkDirty(pathsFinal); } } else { if (autoStage) { GitCommands.Stage(repository, pathsFinal); } MarkDirty(pathsFinal); } } }
private void Update(bool reloadRepository, string[] paths = null) { StartUpdating(paths); if (reloadRepository && IsValidRepo) { if (repository != null) { repository.Dispose(); } repository = new Repository(RepoPath); callbacks.IssueOnRepositoryLoad(repository); } if (repository != null) { if (!forceSingleThread && Threading.IsFlagSet(GitSettingsJson.ThreadingType.StatusList)) { RetreiveStatusThreaded(paths); } else { RetreiveStatus(paths); } } }
private void Update(bool reloadRepository, string[] paths = null) { if (initializer.IsValidRepo) { StartUpdating(paths); if (reloadRepository || repository == null) { if (repository != null) { repository.Dispose(); } repository = CreateRepository(gitSettings.ActiveSubModule); callbacks.IssueOnRepositoryLoad(repository); } if (!forceSingleThread && Threading.IsFlagSet(GitSettingsJson.ThreadingType.Status)) { RetreiveStatusThreaded(paths); } else { RetreiveStatus(paths); } } }
public void AutoUnstage(string[] paths) { if (Threading.IsFlagSet(GitSettingsJson.ThreadingType.Unstage)) { AsyncUnstage(paths); } else { GitCommands.Unstage(repository, paths); MarkDirty(paths); } }
public void AutoStage(params string[] localPaths) { if (Threading.IsFlagSet(GitSettingsJson.ThreadingType.Stage)) { AsyncStage(localPaths); } else { GitCommands.Stage(repository, localPaths); MarkDirtyAuto(localPaths); } }
private void PostprocessUnstage(string[] paths) { if (repository == null || !IsValidRepo) { return; } if (prefs.GetBool(UnityEditorGitPrefs.DisablePostprocess)) { return; } string[] pathsFinal = paths.SelectMany(GetPathWithMeta).ToArray(); if (pathsFinal.Length > 0) { if (gitSettings != null && Threading.IsFlagSet(GitSettingsJson.ThreadingType.Unstage)) { AsyncUnstage(pathsFinal); } else { GitCommands.Unstage(repository, pathsFinal); MarkDirty(pathsFinal); } } }