git-watchtower 1.8.5 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/git/branch.js +2 -2
package/package.json
CHANGED
package/src/git/branch.js
CHANGED
|
@@ -225,7 +225,7 @@ async function checkout(branchName, options = {}) {
|
|
|
225
225
|
const { stdout: localBranches } = await execGit(['branch', '--list'], { cwd });
|
|
226
226
|
const hasLocal = localBranches
|
|
227
227
|
.split('\n')
|
|
228
|
-
.some((b) => b.trim().replace(
|
|
228
|
+
.some((b) => b.trim().replace(/^\* /, '') === safeName);
|
|
229
229
|
|
|
230
230
|
if (hasLocal) {
|
|
231
231
|
// Local branch exists - just check out
|
|
@@ -335,7 +335,7 @@ async function getLocalBranches(cwd) {
|
|
|
335
335
|
const { stdout } = await execGit(['branch', '--list'], { cwd });
|
|
336
336
|
return stdout
|
|
337
337
|
.split('\n')
|
|
338
|
-
.map((b) => b.trim().replace(
|
|
338
|
+
.map((b) => b.trim().replace(/^\* /, ''))
|
|
339
339
|
.filter(Boolean);
|
|
340
340
|
} catch (error) {
|
|
341
341
|
return [];
|