public static string ConfigGet(string key) { try { return(ShellHelpers.OutputFromCommand("git", "config --get " + key)); } catch { _isWorking = false; return(null); } }
public static string GetDiff(string path, bool wordDiff) { try { string diffParams = wordDiff ? "--word-diff=porcelain " : ""; return(ShellHelpers.OutputFromCommand("git", "diff --submodule=log " + diffParams + "-- " + QuotePath(path))); } catch { _isWorking = false; return(null); } }
public static void RemovePath(string path) { ShellHelpers.OutputFromCommand("git", "rm -- " + QuotePath(path)); }
public static void UnstagePath(string path) { ShellHelpers.OutputFromCommand("git", "reset HEAD -- " + QuotePath(path)); }
public static void StagePath(string path) { ShellHelpers.OutputFromCommand("git", "add --ignore-errors -- " + QuotePath(path)); }