From 8013ee68fe0e8e5ce0e5ce110051169d291e9b18 Mon Sep 17 00:00:00 2001 From: Johan t Hart Date: Tue, 3 Feb 2009 22:46:26 +0100 Subject: [PATCH] Call CGitCall::OnEnd() when git.exe ended --- src/Git/Git.cpp | 2 ++ src/Git/Git.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 6dd0ad8..4daf111 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -292,8 +292,10 @@ int CGit::Run(CGitCall* pcall) BYTE data[CALL_OUTPUT_READ_CHUNK_SIZE]; while(ReadFile(hRead,data,CALL_OUTPUT_READ_CHUNK_SIZE,&readnumber,NULL)) { + //Todo: when OnOutputData() returns 'true', abort git-command. Send CTRL-C signal? pcall->OnOutputData(data,readnumber); } + pcall->OnEnd(); CloseHandle(pi.hThread); diff --git a/src/Git/Git.h b/src/Git/Git.h index 4daf9f6..43cdf18 100644 --- a/src/Git/Git.h +++ b/src/Git/Git.h @@ -17,6 +17,7 @@ public: //When this function returns 'true' the git command should be aborted. //This behavior is not implemented yet. virtual bool OnOutputData(const BYTE* data, size_t size)=0; + virtual void OnEnd(){} private: CString m_Cmd; -- 2.11.0