From 7ac6a4973c91e652727a28f26a4a4e3c94d66021 Mon Sep 17 00:00:00 2001 From: Johan 't Hart Date: Thu, 4 Jun 2009 23:51:40 +0200 Subject: [PATCH] Show changed files after pull. --- src/Git/Git.cpp | 2 +- src/Git/Git.h | 2 +- src/TortoiseProc/Commands/PullCommand.cpp | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 7d3787c7d..0e845a618 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -603,7 +603,7 @@ int CGit::RunLogFile(CString cmd,CString &filename) // return 0; } -git_revnum_t CGit::GetHash(CString &friendname) +git_revnum_t CGit::GetHash(const CString &friendname) { CString cmd; CString out; diff --git a/src/Git/Git.h b/src/Git/Git.h index e0dde8dc2..a339664f8 100644 --- a/src/Git/Git.h +++ b/src/Git/Git.h @@ -97,7 +97,7 @@ public: BOOL EnumFiles(const TCHAR *pszProjectPath, const TCHAR *pszSubPath, unsigned int nFlags, WGENUMFILECB *pEnumCb, void *pUserData); - git_revnum_t GetHash(CString &friendname); + git_revnum_t GetHash(const CString &friendname); int BuildOutputFormat(CString &format,bool IsFull=TRUE); //int GetShortLog(CString &log,CTGitPath * path=NULL, int count =-1); diff --git a/src/TortoiseProc/Commands/PullCommand.cpp b/src/TortoiseProc/Commands/PullCommand.cpp index 52b69961e..6ef53f8c6 100644 --- a/src/TortoiseProc/Commands/PullCommand.cpp +++ b/src/TortoiseProc/Commands/PullCommand.cpp @@ -25,6 +25,7 @@ #include "MessageBox.h" #include "PullFetchDlg.h" #include "ProgressDlg.h" +#include "FileDiffDlg.h" bool PullCommand::Execute() { @@ -35,11 +36,19 @@ bool PullCommand::Execute() CString url; url=dlg.m_RemoteURL; CString cmd; + CString hashOld = g_Git.GetHash(L"HEAD"); cmd.Format(_T("git.exe pull \"%s\" %s"),url,dlg.m_RemoteBranchName); CProgressDlg progress; progress.m_GitCmd=cmd; if(progress.DoModal()==IDOK) + { + CString hashNew = g_Git.GetHash(L"HEAD"); + CFileDiffDlg dlg; + dlg.SetDiff(NULL,hashOld,hashNew); + dlg.DoModal(); + return TRUE; + } } #if 0 CCloneDlg dlg; -- 2.11.4.GIT