From c960b894e08e65e5a96c3f3b84adc2714e034e35 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Sat, 17 Nov 2012 19:17:38 +0800 Subject: [PATCH] Git property page should not show last modified info if the file is not in HEAD, such as untracked or ignored file Signed-off-by: Sup Yut Sum --- src/TortoiseShell/GITPropertyPage.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/TortoiseShell/GITPropertyPage.cpp b/src/TortoiseShell/GITPropertyPage.cpp index 1fbe8ad6c..2936b2326 100644 --- a/src/TortoiseShell/GITPropertyPage.cpp +++ b/src/TortoiseShell/GITPropertyPage.cpp @@ -389,6 +389,14 @@ static git_commit * FindFileRecentCommit(git_repository *repository, CString pat if (ret < 0 && ret != GIT_EUSER) throw "git_tree_walk 1"; + // check if file not found + if (git_oid_iszero(&treewalkstruct.oid)) + { + git_commit_free(commit); + commit = NULL; + break; + } + bool diff = true; // for merge point, check if it is different to all parents, if yes then there are real change in the merge point. // if no parent then of course it is different -- 2.11.4.GIT