We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 652d12f + 05c4f1f commit 1b4d0a0Copy full SHA for 1b4d0a0
lib/detectLocalGit.js
@@ -1,7 +1,8 @@
1
var fs = require('fs');
2
var path = require('path');
3
4
-var REGEX_BRANCH = /^ref: refs\/heads\/(\w+)$/;
+// branch naming only has a few excluded characters, see git-check-ref-format(1)
5
+var REGEX_BRANCH = /^ref: refs\/heads\/([^?*\[\\~^:]+)$/;
6
7
module.exports = function detectLocalGit() {
8
var dir = process.cwd(), gitDir;
0 commit comments