chore: remove unused getBranch util
This commit is contained in:
10
src/utils.js
10
src/utils.js
@@ -36,16 +36,6 @@ exports.getIdent = () => {
|
||||
return name;
|
||||
};
|
||||
|
||||
exports.getBranch = () => {
|
||||
const headPath = path.join(exports.getRootPath(), '.git/HEAD');
|
||||
if (!exports.canAccessFile(headPath)) throw new Error(`Git HEAD not found: ${headPath}`);
|
||||
|
||||
const head = fs.readFileSync(headPath);
|
||||
const match = /ref: refs\/heads\/([^\n]+)/.exec(head);
|
||||
if (!match) throw new Error(`Unable to read branch from ${headPath}`);
|
||||
return match[1];
|
||||
};
|
||||
|
||||
exports.getConfig = (overrides = {}) => {
|
||||
const joycon = new JoyCon();
|
||||
const defaults = {
|
||||
|
||||
Reference in New Issue
Block a user