mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 14:22:02 +00:00
Compare commits
1 Commits
cf35ca8650
...
fix-error
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c669fbe6a |
@@ -47,7 +47,7 @@ export function createCheckoutBranchHandler() {
|
||||
}
|
||||
|
||||
// Get current branch for reference
|
||||
const { stdout: currentBranchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: currentBranchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const currentBranch = currentBranchOutput.trim();
|
||||
|
||||
@@ -59,7 +59,7 @@ export function createCommitHandler() {
|
||||
const commitHash = hashOutput.trim().substring(0, 8);
|
||||
|
||||
// Get branch name
|
||||
const { stdout: branchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: branchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const branchName = branchOutput.trim();
|
||||
|
||||
@@ -43,7 +43,7 @@ export function createCreatePRHandler() {
|
||||
const effectiveProjectPath = projectPath || worktreePath;
|
||||
|
||||
// Get current branch name
|
||||
const { stdout: branchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: branchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
env: execEnv,
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ export function createDeleteHandler() {
|
||||
// Get branch name before removing worktree
|
||||
let branchName: string | null = null;
|
||||
try {
|
||||
const { stdout } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
branchName = stdout.trim();
|
||||
|
||||
@@ -31,7 +31,7 @@ export function createInfoHandler() {
|
||||
const worktreePath = path.join(projectPath, '.worktrees', featureId);
|
||||
try {
|
||||
await secureFs.access(worktreePath);
|
||||
const { stdout } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
res.json({
|
||||
|
||||
@@ -34,7 +34,7 @@ export function createListBranchesHandler() {
|
||||
}
|
||||
|
||||
// Get current branch
|
||||
const { stdout: currentBranchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: currentBranchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const currentBranch = currentBranchOutput.trim();
|
||||
|
||||
@@ -35,7 +35,7 @@ export function createMergeHandler() {
|
||||
const worktreePath = path.join(projectPath, '.worktrees', featureId);
|
||||
|
||||
// Get current branch
|
||||
const { stdout: currentBranch } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: currentBranch } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: projectPath,
|
||||
});
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export function createPullHandler() {
|
||||
}
|
||||
|
||||
// Get current branch name
|
||||
const { stdout: branchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: branchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const branchName = branchOutput.trim();
|
||||
|
||||
@@ -29,7 +29,7 @@ export function createPushHandler() {
|
||||
}
|
||||
|
||||
// Get branch name
|
||||
const { stdout: branchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: branchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const branchName = branchOutput.trim();
|
||||
|
||||
@@ -87,7 +87,7 @@ export function createSwitchBranchHandler() {
|
||||
}
|
||||
|
||||
// Get current branch
|
||||
const { stdout: currentBranchOutput } = await execAsync('git rev-parse --abbrev-ref HEAD', {
|
||||
const { stdout: currentBranchOutput } = await execAsync('git symbolic-ref --short HEAD', {
|
||||
cwd: worktreePath,
|
||||
});
|
||||
const previousBranch = currentBranchOutput.trim();
|
||||
|
||||
Reference in New Issue
Block a user