Cannot parse Git status when files are renamed
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 183
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Bug description
When files have been renamed, leeway fails to parse the Git status and assumes all files are "dirty":
WARN[0000] cannot parse git status: assuming all files are dirty error="cannot parse git status \"R bootstrap/infra/README.md -> bootstrap/README.md\": expected two segments, got 4"
Steps to reproduce
Rename a file in the Git working copy using git mv
Expected behavior
No response
Example repository
No response
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Git status parsing code that emits the reported error, then reproduce the case with a working-copy file renamed using git mv. Trace how the R bootstrap/infra/README.md -> bootstrap/README.md status line is split, and verify that renamed files are parsed without causing all files to be marked dirty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100