Beispiel #1
0
 public static string ConfigGet(string key)
 {
     try {
         return(ShellHelpers.OutputFromCommand("git", "config --get " + key));
     } catch {
         _isWorking = false;
         return(null);
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 public static void RemovePath(string path)
 {
     ShellHelpers.OutputFromCommand("git", "rm -- " + QuotePath(path));
 }
Beispiel #4
0
 public static void UnstagePath(string path)
 {
     ShellHelpers.OutputFromCommand("git", "reset HEAD -- " + QuotePath(path));
 }
Beispiel #5
0
 public static void StagePath(string path)
 {
     ShellHelpers.OutputFromCommand("git", "add --ignore-errors -- " + QuotePath(path));
 }