-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't working as it should.Something isn't working as it should.fixBug fixesBug fixesgoPull requests that update go codePull requests that update go codegood first issueGood for newcomersGood for newcomers
Description
Description
I encountered a critical error when attempting to commit changes involving a deleted file. The tool attempts to stage the specific file path directly, which results in a failure because the file no longer exists on the filesystem. The logic should handle file deletions gracefully rather than attempting to add a non-existent file.
Reproduction Steps
- Delete a tracked file from the repository (e.g.,
rm internal/errores/aws_errors.go). - Run the commit suggestion command.
- When prompted with "Confirm commit? (y/n)", select "y".
Expected Behavior
I expected the tool to detect that the file was deleted and stage the deletion correctly (similar to git add -u or git rm), allowing the commit process to proceed without errors.
Actual Behavior
The CLI crashed with an error indicating it could not add the file to staging because the file does not exist.
Version
Latest
Additional Context
[ERROR] file does not exist file=internal/errores/aws_errors.go full_path=/home/enano/elytra/internal/errores/aws_errors.go
[ERROR] failed to stage file file=internal/errores/aws_errors.go error=GIT: Failed to add file to staging (stat /home/enano/elytra/internal/errores/aws_errors.go: no such file or directory)
❌ Error adding file internal/errores/aws_errors.go to staging, due to: GIT: Failed to add file to staging (stat /home/enano/elytra/internal/errores/aws_errors.go: no such file or directory)
[ERROR] failed to handle commit selection error=error adding internal/errores/aws_errors.go: GIT: Failed to add file to staging (stat /home/enano/elytra/internal/errores/aws_errors.go: no such file or directory)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working as it should.Something isn't working as it should.fixBug fixesBug fixesgoPull requests that update go codePull requests that update go codegood first issueGood for newcomersGood for newcomers