• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / revdiff / 28422375943
90%

Build:
DEFAULT BRANCH: master
Ran 30 Jun 2026 05:26AM UTC
Jobs 1
Files 71
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 05:25AM UTC coverage: 89.807% (-0.1%) from 89.934%
28422375943

push

github

web-flow
fix: detect renames when the new file is untracked (#246)

* fix: detect renames when the new file is untracked

a plain `mv old new` (no `git mv`/staging) left `old` as an unstaged
deletion and `new` untracked, so `git diff -M` never paired them - the
tree showed a deletion plus an all-+ add instead of one rename.

`UntrackedRenames` recovers the pairing off a throwaway index: copy
`.git/index`, `git add -N` the untracked paths against the copy via
`GIT_INDEX_FILE`, then `git diff -M` reports the rename. The real index
and working tree are never touched. `FileDiff` renders these the same
way via `untrackedRenameDiff`. Git-only (hg/jj have no untracked-rename
concept), gated to unstaged working-tree mode.

Related to #243

* fix(test): clear AGTERM env so launcher exit-code test stays hermetic

`cleanOverlayEnv` cleared every overlay-detection var except the agterm
ones. On an agterm host `AGTERM_SESSION_ID` leaked from the real
environment, so the launcher took its agterm branch (real `agtermctl
session overlay open`) instead of the fake backend under test. That path
doesn't pipe the fake revdiff's stdout/exit back, so every non-clean
case returned exit 0 / empty output, while the "clean" case passed by
coincidence. CI stayed green because CI isn't an agterm session.

now clear `AGTERM_SESSION_ID` and `AGTERM_SOCKET` too. The agterm overlay
backend (#238) added the launcher branch but left this helper out of sync.

* fix(review-loop): iteration 1 addressed 8 findings

- [major] [annotations_load.go] --annotations preload now runs the untracked-rename detector (foldUntrackedRenames) so (-)/context annotations on an untracked rename round-trip instead of being dropped as all-added
- [major] [diff.go] untracked-rename git calls use GIT_LITERAL_PATHSPECS=1 (renameIndexEnv) so a filename like ":(top)x" is treated literally, not as pathspec magic
- [minor] [diff.go] temp index path made absolute (filepath.Abs) so GIT_INDEX_FILE and cleanup agree when TMPDI... (continued)

153 of 225 new or added lines in 6 files covered. (68.0%)

10494 of 11685 relevant lines covered (89.81%)

3063.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
43
20.59
-0.23% app/main.go
25
91.98
-3.59% app/diff/diff.go
3
91.98
-1.18% app/annotations_load.go
1
56.38
0.0% app/renderer_setup.go
Jobs
ID Job ID Ran Files Coverage
1 28422375943.1 30 Jun 2026 05:26AM UTC 71
89.81
GitHub Action Run
Source Files on build 28422375943
  • Tree
  • List 71
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 231fe042 on github
  • Prev Build on refs/tags/v1.9.0 (#28412875676)
  • Next Build on master (#28422595830)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc