mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler. Fix #35473
This commit is contained in:
1 parent
866c636f52
commit
325e059a50
6 files changed
+325
-6
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import {minimatch} from 'minimatch';
|
||||
import {createMonaco} from './codeeditor.ts';
|
||||
import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts';
|
||||
import {POST} from '../modules/fetch.ts';
|
||||
import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
import {globMatch} from '../utils/glob.ts';
|
||||
|
||||
const {appSubUrl, csrfToken} = window.config;
|
||||
|
||||
@@ -108,7 +108,7 @@ function initRepoSettingsBranches() {
|
||||
let matched = false;
|
||||
const statusCheck = el.getAttribute('data-status-check');
|
||||
for (const pattern of validPatterns) {
|
||||
if (minimatch(statusCheck, pattern, {noext: true})) { // https://github.com/go-gitea/gitea/issues/33121 disable extended glob syntax
|
||||
if (globMatch(statusCheck, pattern, '/')) {
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user