Update to Qt6
This commit is contained in:
@@ -111,19 +111,20 @@ void Addon::scanBranches()
|
||||
if (!git_reflog_read(&reflog, m_repo.get(), "HEAD")) {
|
||||
for (size_t i = 0; i < git_reflog_entrycount(reflog); i++) {
|
||||
auto entry = git_reflog_entry_byindex(reflog, i);
|
||||
QRegExp rex("checkout: moving from \\S+ to (.*)");
|
||||
if (rex.indexIn(git_reflog_entry_message(entry)) != -1) {
|
||||
QRegularExpression rex("checkout: moving from \\S+ to (.*)");
|
||||
auto match = rex.match(git_reflog_entry_message(entry));
|
||||
if (match.hasMatch()) {
|
||||
auto f = &git_branch_upstream_remote;
|
||||
git_branch_lookup(&ref, m_repo.get(), rex.cap(1).toLocal8Bit(), GIT_BRANCH_LOCAL);
|
||||
git_branch_lookup(&ref, m_repo.get(), match.captured(1).toLocal8Bit(), GIT_BRANCH_LOCAL);
|
||||
if (!ref) {
|
||||
f = &git_branch_remote_name;
|
||||
git_branch_lookup(&ref, m_repo.get(), rex.cap(1).toLocal8Bit(), GIT_BRANCH_REMOTE);
|
||||
git_branch_lookup(&ref, m_repo.get(), match.captured(1).toLocal8Bit(), GIT_BRANCH_REMOTE);
|
||||
}
|
||||
if (!ref) break;
|
||||
git_buf buf = GIT_BUF_INIT_CONST(0, nullptr);
|
||||
if (!f(&buf, m_repo.get(), git_reference_name(ref))) {
|
||||
data.cr = buf.ptr;
|
||||
data.cb = rex.cap(1);
|
||||
data.cb = match.captured(1);
|
||||
}
|
||||
ref.reset();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user