Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ export class GitOperations {
async isMergeInProgress(): Promise<boolean> {
try {
const status = await this.git.status();
return status.files.some((f: StatusFile) => f.index === 'U');
// Any index code containing 'U' or 'A' in both indicates a conflict
// U = unmerged, A = added by both, D = deleted by both
const conflictCodes = ['U', 'A', 'D'];
return status.files.some((f: StatusFile) => {
const code = f.index;
return conflictCodes.some(c => code.includes(c)) || code === 'AA' || code === 'DD';
});
} catch {
return false;
}
Expand Down
7 changes: 6 additions & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export class ConflictResolver {
console.log(` Opening in ${editor}...`);

return new Promise((resolvePromise, reject) => {
const editorProcess = spawn(editor, [fullPath], {
// Split editor command to handle args like "code --wait" or "subl -w --new-window"
const parts = editor.split(/\s+/);
const command = parts[0];
const args = [...parts.slice(1), fullPath];

const editorProcess = spawn(command, args, {
stdio: 'inherit',
});

Expand Down