From f33bd88fea7a94711f9ce7e16754019deed9f97f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 30 Jul 2011 23:22:06 -0700 Subject: [PATCH] Fixed issue with revert file --- Kudu.Core/SourceControl/Git/GitExeRepository.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Kudu.Core/SourceControl/Git/GitExeRepository.cs b/Kudu.Core/SourceControl/Git/GitExeRepository.cs index 28473423c..05e10b19f 100644 --- a/Kudu.Core/SourceControl/Git/GitExeRepository.cs +++ b/Kudu.Core/SourceControl/Git/GitExeRepository.cs @@ -58,7 +58,12 @@ public void RevertFile(string path) { _gitExe.Execute("rm --cached \"{0}\"", path); } else { - _gitExe.Execute("reset HEAD \"{0}\"", path); + try { + _gitExe.Execute("reset HEAD \"{0}\"", path); + } + catch { + // This command returns a non zero exit code even when it succeeds + } } // Now get the status of the file