fix(desktop): remove invalid -M flag from git status command#997
Conversation
The -M flag is a git diff option for rename detection, not a git status option. This was causing "error: unknown switch 'M'" when trying to remove workspaces. git status --porcelain=v1 already includes rename information through R (rename) and C (copy) status codes, so the flag was unnecessary.
📝 WalkthroughWalkthroughThe -M flag was removed from a git status command invocation in the desktop workspace utilities. The porcelain v1 format already provides rename detection via status codes, making the explicit flag redundant. The parsing logic and behavior remain unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@saddlepaddle @AviPeltz Can you review this? When i try to remove the workspace im getting this error. |
|
This works thank you @Ipriyankrajai ! |
|
@Kitenite When are we planning to release this? Because this is causing files on right sidebar to fail Before
After
|




Summary
-Mflag from thegit statuscommand ingetStatusNoLock()porcelain=v1already includes rename detectionProblem
When trying to remove a workspace, users saw:
Root Cause
The
-Mflag is agit diffoption for rename detection, not agit statusoption. The comment incorrectly stated it was needed for rename detection, butgit status --porcelain=v1already includes rename information throughR(rename) andC(copy) status codes.Test plan
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.