Git: Fix pattern for commit hash matching

* Avoid matching mid-word.
* Avoid matching after "mode ".
* Change to raw string literals.

Fixes: QTCREATORBUG-24768
Fixes: QTCREATORBUG-28268
Change-Id: I68abbf3de7928c60e0fe2d944adedaa6db94b1a4
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2022-10-11 09:50:45 +03:00
committed by Orgad Shaneh
parent ae58d373b0
commit 7c623f99d8
2 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@
#include <QTextCodec>
#include <QTextCursor>
#define CHANGE_PATTERN "[a-f0-9]{7,40}"
#define CHANGE_PATTERN "\\b[a-f0-9]{7,40}\\b"
using namespace Core;
using namespace Utils;