Skip to content

Commit

Permalink
Merge pull request #85 from addaleax/branch-name-detection
Browse files Browse the repository at this point in the history
Accept more valid git branch names
  • Loading branch information
nickmerwin committed Dec 10, 2015
2 parents 652d12f + 05c4f1f commit 1b4d0a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/detectLocalGit.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 1b4d0a0

Please sign in to comment.