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

sds / overcommit / 1818
90%
master: 91%

Build:
Build:
LAST BUILD BRANCH: solargraph-change-output-format
DEFAULT BRANCH: master
Ran 29 Sep 2019 04:48AM UTC
Jobs 3
Files 402
Run time 26s
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

pending completion
1818

push

travis-ci

sds
Avoid stashing changes when all changes are staged

It was suggested in #135 that a potential way to avoid unnecessary file
change detection and general stashing woes would be to stash changes
only when there were unstaged changes that needed to be excluded from
the run.

This presents a nice optimization that I wish we had considered so long
ago. This gives us the opportunity to simplify the logic now that we see
the purpose of this feature a little more clearly: stash only when you
need to.

Issue #669 raised an interesting point about the difficulty to detect if
a stash entry was created, so we modified the tests to check if a method
call was made. This isn't great as its peeking deep into the
implementation, so we added some additional tests that ensured the
methods in question actually existed. Not perfect, but gives us some
confidence in the implementation.

While here, we were able to:

* Extract the stashing logic into a separate `stash_changes` helper
  method.

* Eliminate the `initial_commit?` check, since in the case of an empty
  it's impossible to see any "unstaged" tracked files, as there aren't
  yet any tracked files by definition.

* Simplify the `cleanup_environment` logic to just use whether changes
  were stashed in order to decide whether to restore.

Closes #669.

5923 of 6554 relevant lines covered (90.37%)

378.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1818.1 (2.4) 29 Sep 2019 04:48AM UTC 0
90.39
Travis Job 1818.1
2 1818.2 (2.5) 29 Sep 2019 04:48AM UTC 0
90.37
Travis Job 1818.2
3 1818.3 (2.6) 29 Sep 2019 04:48AM UTC 0
90.37
Travis Job 1818.3
Source Files on build 1818
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1818
  • 70ff6295 on github
  • Next Build on conservative-stash (#1820)
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