From a7e24dc3aac52df57d80a3941d090519fa3f390b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 7 Jun 2012 15:29:27 +0200 Subject: [PATCH] SparkleLib: Use rev-parse HEAD to determine latest commit While `git log -1 --format=%H` does show the same data, it needs to start up the revision walking machinery just to show the latest commit's hash. `git rev-parse HEAD` tells us this commit's hash without doing all the extra work. --- SparkleLib/Git/SparkleRepoGit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 6a8b4e48..a15ff560 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -142,7 +142,7 @@ namespace SparkleLib.Git { if (File.Exists (rebase_apply_file)) File.Delete (rebase_apply_file); - SparkleGit git = new SparkleGit (LocalPath, "log -1 --format=%H"); + SparkleGit git = new SparkleGit (LocalPath, "rev-parse HEAD"); git.Start (); git.WaitForExit ();