From 408e280077dc5a41454247ba67ab68e112b6e71a Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 15 Jun 2014 20:06:01 +0200 Subject: [PATCH] Drop depth parameter Signed-off-by: Sven Strickroth --- src/Utils/Hooks.cpp | 13 ++----------- src/Utils/Hooks.h | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/Utils/Hooks.cpp b/src/Utils/Hooks.cpp index ed3b329a4..998674665 100644 --- a/src/Utils/Hooks.cpp +++ b/src/Utils/Hooks.cpp @@ -212,13 +212,6 @@ void CHooks::AddCWDParam(CString& sCmd, const CTGitPathList& pathList) AddParam(sCmd, pathList.GetCommonRoot().GetDirectory().GetWinPathString()); } -void CHooks::AddDepthParam(CString& sCmd, git_depth_t depth) -{ - CString sTemp; - sTemp.Format(_T("%d"), depth); - AddParam(sCmd, sTemp); -} - void CHooks::AddErrorParam(CString& sCmd, const CString& error) { CTGitPath tempPath; @@ -253,28 +246,26 @@ bool CHooks::StartCommit(const CTGitPathList& pathList, CString& message, DWORD& return true; } -bool CHooks::PreCommit(const CTGitPathList& pathList, git_depth_t depth, const CString& message, DWORD& exitcode, CString& error) +bool CHooks::PreCommit(const CTGitPathList& pathList, const CString& message, DWORD& exitcode, CString& error) { hookiterator it = FindItem(pre_commit_hook, pathList); if (it == end()) return false; CString sCmd = it->second.commandline; AddPathParam(sCmd, pathList); - AddDepthParam(sCmd, depth); AddMessageFileParam(sCmd, message); AddCWDParam(sCmd, pathList); exitcode = RunScript(sCmd, pathList.GetCommonRoot().GetDirectory().GetWinPath(), error, it->second.bWait, it->second.bShow); return true; } -bool CHooks::PostCommit(const CTGitPathList& pathList, git_depth_t depth, const GitRev& rev, const CString& message, DWORD& exitcode, CString& error) +bool CHooks::PostCommit(const CTGitPathList& pathList, const GitRev& rev, const CString& message, DWORD& exitcode, CString& error) { hookiterator it = FindItem(post_commit_hook, pathList); if (it == end()) return false; CString sCmd = it->second.commandline; AddPathParam(sCmd, pathList); - AddDepthParam(sCmd, depth); AddMessageFileParam(sCmd, message); AddParam(sCmd, rev.m_CommitHash.ToString()); AddErrorParam(sCmd, error); diff --git a/src/Utils/Hooks.h b/src/Utils/Hooks.h index c587dd070..0cf17d1c8 100644 --- a/src/Utils/Hooks.h +++ b/src/Utils/Hooks.h @@ -83,7 +83,6 @@ private: CHooks(); ~CHooks(); void AddPathParam(CString& sCmd, const CTGitPathList& pathList); - void AddDepthParam(CString& sCmd, git_depth_t depth); void AddCWDParam(CString& sCmd, const CTGitPathList& pathList); void AddErrorParam(CString& sCmd, const CString& error); void AddParam(CString& sCmd, const CString& param); @@ -136,7 +135,6 @@ public: * Executes the Pre-Commit-Hook that first matches one of the paths in * \c pathList. * \param pathList a list of paths to look for the hook scripts - * \param depth the depth of the commit * \param message the commit message * \param exitcode on return, contains the exit code of the hook script * \param error the data the hook script outputs to stderr @@ -144,18 +142,14 @@ public: * replaced with the path to a temporary file which contains a list of files * in \c pathList, separated by newlines. The hook script can parse this * file to get all the paths the update is about to be done on. - * The string "%DEPTH%" is replaced with the numerical value (string) of the - * Git_depth_t parameter. See the git source documentation about the - * values. */ - bool PreCommit(const CTGitPathList& pathList, git_depth_t depth, + bool PreCommit(const CTGitPathList& pathList, const CString& message, DWORD& exitcode, CString& error); /** * Executes the Post-Commit-Hook that first matches one of the paths in * \c pathList. * \param pathList a list of paths to look for the hook scripts - * \param depth the depth of the commit * \param message the commit message * \param rev the revision the commit was done to * \param exitcode on return, contains the exit code of the hook script @@ -164,11 +158,8 @@ public: * replaced with the path to a temporary file which contains a list of files * in \c pathList, separated by newlines. The hook script can parse this * file to get all the paths the commit is about to be done on. - * The string "%DEPTH%" is replaced with the numerical value (string) of the - * Git_depth_t parameter. See the git source documentation about the - * values. */ - bool PostCommit(const CTGitPathList& pathList, git_depth_t depth, + bool PostCommit(const CTGitPathList& pathList, const GitRev& rev, const CString& message, DWORD& exitcode, CString& error); -- 2.11.4.GIT