diff options
| author | Nick Merwin <[email protected]> | 2015-12-10 12:54:45 -0800 |
|---|---|---|
| committer | Nick Merwin <[email protected]> | 2015-12-10 12:54:45 -0800 |
| commit | 1b4d0a06585ee37a21551fe533e200a84a3ccd4f (patch) | |
| tree | c8dafa9588c23241dba2cb91d04151cd269238a6 | |
| parent | 652d12f69ac96e5e0a4a32e17c71a44f574a95b4 (diff) | |
| parent | 05c4f1f374e138f0ed0cab62d55f028841a36fe6 (diff) | |
| download | node-coveralls-1b4d0a06585ee37a21551fe533e200a84a3ccd4f.tar.xz node-coveralls-1b4d0a06585ee37a21551fe533e200a84a3ccd4f.zip | |
Merge pull request #85 from addaleax/branch-name-detection
Accept more valid git branch names
| -rw-r--r-- | lib/detectLocalGit.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/detectLocalGit.js b/lib/detectLocalGit.js index 773eb70..ac8ed29 100644 --- a/lib/detectLocalGit.js +++ b/lib/detectLocalGit.js @@ -1,7 +1,8 @@ var fs = require('fs'); var path = require('path'); -var REGEX_BRANCH = /^ref: refs\/heads\/(\w+)$/; +// branch naming only has a few excluded characters, see git-check-ref-format(1) +var REGEX_BRANCH = /^ref: refs\/heads\/([^?*\[\\~^:]+)$/; module.exports = function detectLocalGit() { var dir = process.cwd(), gitDir; |
