Commit 0f04ef5a authored by Sven Strickroth's avatar Sven Strickroth

LogDlg: Allow to filter for annotated tags

Signed-off-by: Sven Strickroth's avatarSven Strickroth <email@cs-ware.de>
parent c55b2e65
......@@ -3207,6 +3207,14 @@ BOOL CGitLogListBase::IsMatchFilter(bool bRegex, GitRevLoglist* pRev, std::tr1::
}
}
if (m_SelectedFilters & LOGFILTER_ANNOTATEDTAG)
{
if (std::regex_search(std::wstring(GetTagInfo(pRev)), pat, flags))
{
return TRUE;
}
}
if (m_SelectedFilters & LOGFILTER_PATHS)
{
CTGitPathList *pathList=NULL;
......@@ -3330,6 +3338,17 @@ BOOL CGitLogListBase::IsMatchFilter(bool bRegex, GitRevLoglist* pRev, std::tr1::
}
}
if (m_SelectedFilters & LOGFILTER_ANNOTATEDTAG)
{
CString msg = GetTagInfo(pRev);
if (!m_bFilterCaseSensitively)
msg = msg.MakeLower();
if ((msg.Find(find) >= 0))
{
return result;
}
}
if (m_SelectedFilters & LOGFILTER_REFNAME)
{
STRING_VECTOR refs = m_HashMap[pRev->m_CommitHash];
......
......@@ -53,7 +53,8 @@
#define LOGFILTER_REFNAME 0x0080
#define LOGFILTER_EMAILS 0x0100
#define LOGFILTER_NOTES 0x0200
#define LOGFILTER_CASE 0x0400
#define LOGFILTER_ANNOTATEDTAG 0x0400
#define LOGFILTER_CASE 0x0800
#define LOGLIST_SHOWNOTHING 0x0000
#define LOGLIST_SHOWLOCALBRANCHES 0x0001
......
......@@ -2097,6 +2097,9 @@ LRESULT CLogDlg::OnClickedInfoIcon(WPARAM wParam, LPARAM lParam)
temp.LoadString(IDS_LOG_FILTER_REFNAME);
popup.AppendMenu(LOGMENUFLAGS(LOGFILTER_REFNAME), LOGFILTER_REFNAME, temp);
temp.LoadString(IDS_PROC_LOG_TAGINFO);
popup.AppendMenu(LOGMENUFLAGS(LOGFILTER_ANNOTATEDTAG), LOGFILTER_ANNOTATEDTAG, temp);
temp.LoadString(IDS_NOTES);
popup.AppendMenu(LOGMENUFLAGS(LOGFILTER_NOTES), LOGFILTER_NOTES, temp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment