Пример #1
0
 //
 // IMPORTANT! These must parallel the settings in ScalarVerb:TrySetRequiredGitConfigSettings
 //
 public void Initialize()
 {
     Directory.CreateDirectory(this.RootPath);
     GitProcess.Invoke(this.RootPath, "init");
     GitProcess.Invoke(this.RootPath, "config core.autocrlf false");
     GitProcess.Invoke(this.RootPath, "config merge.stat false");
     GitProcess.Invoke(this.RootPath, "config merge.renames false");
     GitProcess.Invoke(this.RootPath, "config advice.statusUoption false");
     GitProcess.Invoke(this.RootPath, "config core.abbrev 40");
     GitProcess.Invoke(this.RootPath, "config pack.useSparse true");
     GitProcess.Invoke(this.RootPath, "config reset.quiet true");
     GitProcess.Invoke(this.RootPath, "config status.aheadbehind false");
     GitProcess.Invoke(this.RootPath, "config user.name \"Functional Test User\"");
     GitProcess.Invoke(this.RootPath, "config user.email \"[email protected]\"");
     GitProcess.Invoke(this.RootPath, "remote add origin " + CachePath);
     this.Fetch(this.Commitish);
     GitProcess.Invoke(this.RootPath, "branch --set-upstream " + this.Commitish + " origin/" + this.Commitish);
     GitProcess.Invoke(this.RootPath, "checkout " + this.Commitish);
     GitProcess.Invoke(this.RootPath, "branch --unset-upstream");
 }
Пример #2
0
 public void Fetch(string commitish)
 {
     GitProcess.Invoke(this.RootPath, "fetch origin " + commitish);
 }