From d60ea9fd06140fe9237bead0eacbe6d4ba5b2fe6 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 24 Sep 2011 00:24:54 +0200 Subject: [PATCH] warn user if signed-off-by line is missing Signed-off-by: Sven Strickroth --- src/TortoiseProc/CommitDlg.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index 7f98416ad..16006cb67 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -400,6 +400,14 @@ void CCommitDlg::OnOK() return; } + BOOL bWarnNoSignedOffBy = FALSE; + ProjectProperties::GetBOOLProps(bWarnNoSignedOffBy, _T("tgit.warnnosignedoffby")); + if (bWarnNoSignedOffBy == TRUE && m_cLogMessage.GetText().Find(GetSignedOffByLine()) == -1) + { + if (CMessageBox::Show(this->m_hWnd, _T("You haven't entered a Signed-Off-By line!\nAre you sure you want to commit without this line?"), _T("TortoiseGit"), MB_YESNO | MB_ICONWARNING) != IDYES) + return; + } + m_ListCtrl.WriteCheckedNamesToPathList(m_selectedPathList); #if 0 CRegDWORD regUnversionedRecurse (_T("Software\\TortoiseGit\\UnversionedRecurse"), TRUE); -- 2.11.4.GIT