OSDN Git Service

Add show one file log at dialog box.
[tortoisegit/TortoiseGitJp.git] / src / Git / Git.cpp
index 89e4fd2..d81542b 100644 (file)
@@ -222,21 +222,31 @@ int CGit::GetLog(CString& logOut, CString &hash,  CTGitPath *path ,int count,int
                param += _T(" --full-history ");\r
 \r
        if(mask& LOG_INFO_BOUNDARY)\r
-               param += _T("--left-right --boundary ");\r
+               param += _T(" --left-right --boundary ");\r
+\r
+       if(mask& CGit::LOG_INFO_ALL_BRANCH)\r
+               param += _T(" --all ");\r
+\r
+       if(mask& CGit::LOG_INFO_DETECT_COPYRENAME)\r
+               param += _T(" -C ");\r
+       \r
+       if(mask& CGit::LOG_INFO_DETECT_RENAME )\r
+               param += _T(" -M ");\r
 \r
        param+=hash;\r
 \r
-       cmd.Format(_T("git.exe log %s -C --topo-order --parents %s --pretty=format:\""),\r
+       cmd.Format(_T("git.exe log %s --topo-order --parents %s --pretty=format:\""),\r
                                num,param);\r
 \r
-       BuildOutputFormat(log);\r
+       BuildOutputFormat(log,!(mask&CGit::LOG_INFO_ONLY_HASH));\r
+\r
        cmd += log;\r
        cmd += CString(_T("\"  "))+hash+file;\r
 \r
        return Run(cmd,&logOut);\r
 }\r
 \r
-\r
+#if 0\r
 int CGit::GetShortLog(CString &logOut,CTGitPath * path, int count)\r
 {\r
        CString cmd;\r
@@ -254,6 +264,7 @@ int CGit::GetShortLog(CString &logOut,CTGitPath * path, int count)
        //cmd += CString(_T("\" HEAD~40..HEAD"));\r
        return Run(cmd,&logOut);\r
 }\r
+#endif\r
 \r
 #define BUFSIZE 512\r
 void GetTempPath(CString &path)\r