-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
I encountered a critical issue where the application fails to stage files when the changeset involves file renames. The tool attempts to stage the original filename rather than the new filename, causing the git operation to fail with a fatal error.
Reproduction Steps
- Rename a file in the repository (e.g.,
mv internal/agent/bootstrap/s3_reporter.go internal/agent/bootstrap/storage_reporter.go). - Run the commit generation tool.
- Select the suggested commit message that includes the rename.
- Confirm the commit.
Expected Behavior
I expected the tool to correctly identify the file rename and stage the new filename (or handle the index update) so that the commit process completes successfully.
Actual Behavior
The CLI crashed with a fatal git error because it tried to add the old filename which no longer exists on the filesystem.
Error:
[ERROR] failed to stage file file=internal/agent/bootstrap/s3_reporter.go error=GIT: Failed to add file to staging (exit status 128) - fatal: specified path 'internal/agent/bootstrap/s3_reporter.go' did not match any files
Version
Latest
Additional Context
Logs from the failure:
📊 Changes
internal/agent/bootstrap/{s3_reporter.go => storage_reporter.go} | 0
.../agent/bootstrap/{s3_reporter_test.go => storage_reporter_test.go} | 0
2 files changed, 0 insertions(+), 0 deletions(-)
Confirm commit? (y/n): y
⠋ 🧉 Adding files to staging...[ERROR] failed to stage file file=internal/agent/bootstrap/s3_reporter.go error=GIT: Failed to add file to staging (exit status 128) - fatal: specified path 'internal/agent/bootstrap/s3_reporter.go' did not match any files