#include "GitConfig.h"\r
#include <map>\r
#include "UnicodeUtils.h"\r
+#include "gitdll.h"\r
\r
int CGit::m_LogEncode=CP_UTF8;\r
\r
+\r
static LPTSTR nextpath(LPCTSTR src, LPTSTR dst, UINT maxlen)\r
{\r
LPCTSTR orgsrc;\r
{\r
GetCurrentDirectory(MAX_DIRBUFFER,m_CurrentDir.GetBuffer(MAX_DIRBUFFER));\r
m_CurrentDir.ReleaseBuffer();\r
-\r
+ m_IsGitDllInited = false;\r
+ m_GitDiff=0;\r
CheckMsysGitDir();\r
}\r
\r
CGit::~CGit(void)\r
{\r
+ if(this->m_GitDiff)\r
+ {\r
+ git_close_diff(m_GitDiff);\r
+ m_GitDiff=0;\r
+ }\r
}\r
\r
static char g_Buffer[4096];\r
return GetLog(&gitCall,hash,path,count,mask,from,to);\r
}\r
\r
-CString CGit::GetLogCmd( CString &hash, CTGitPath *path, int count, int mask,CString *from,CString *to)\r
+CString CGit::GetLogCmd( CString &hash, CTGitPath *path, int count, int mask,CString *from,CString *to,bool paramonly)\r
{\r
CString cmd;\r
CString log;\r
}\r
param+=hash;\r
\r
- cmd.Format(_T("git.exe log %s -z --topo-order %s --parents --pretty=format:\""),\r
+ if(paramonly)\r
+ cmd.Format(_T("%s -z --topo-order %s --parents "),\r
+ num,param);\r
+ else\r
+ cmd.Format(_T("git.exe log %s -z --topo-order %s --parents --pretty=format:\""),\r
num,param);\r
\r
BuildOutputFormat(log,!(mask&CGit::LOG_INFO_ONLY_HASH));\r
\r
- cmd += log;\r
- cmd += CString(_T("\" "))+hash+file;\r
+ if(paramonly)\r
+ {\r
+ cmd += hash+file;\r
+ }else\r
+ {\r
+ cmd += log;\r
+ cmd += CString(_T("\" "))+hash+file;\r
+ }\r
\r
return cmd;\r
}\r