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

holocm / holo / 221
82%

Build:
DEFAULT BRANCH: master
Ran 05 Feb 2018 05:55AM UTC
Jobs 2
Files 42
Run time 18s
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
221

Pull #42

travis-ci

web-flow
holo-files: Implement .patch files.

This ended up being a lot more work than I thought it would be... though
a good chunk of that was slowly realizing all of the ways that I could mess
up writing patch files (in the tests) by hand.  Apparently, when applying
`--git` style patches, GNU patch is pretty finicky about the "index" line,
which I had expected it to basically ignore.

BusyBox patch doesn't implement the `-d` flag, despite it being in POSIX
for as long as `patch` has (2001; before that patch was standardized in
XDG/SUS, before that merged with POSIX; but I don't have pre-merge copies
handy to see if they had the `-d` flag).  So use `cmd.Dir` instead of `-d`.

That doesn't mean that BusyBox patch will pass the tests, just that it will
work.  It will still fail the tests:
 - The tests check for `--git` style changing of symlinks.  BusyBox patch
   does not support patching symlinks
 - The tests check for `--git` style changing of and file permissions.
   BusyBox patch does not support that
 - The tests expect it to say "patching file FILENAME" when creating a
   file (GNU patch behavior); BusyBox patch says "creating FILENAME".
 - The BusyBox fuzz detector seems to be less forgiving than the GNU one;
   it rejects my with-fuzz test.
That said, BusyBox patch will still work for users writing ordinary patch
files.

I will 100% not be surprised of the tests don't pass with BSD patch for
similar reasons.

This breaks backward compatibility in a very minor way: previously, a
resource file with the ".patch" suffix was understood to be a verbatim
file; this changes that, obviously.

The target file is operated on in a temporary directory, and without
specifying the `-p` flag or the target filename.  This gives the patch the
freedom to do directory-type operations (change file type).  If the patch
creates other files, they will be ignored.
Pull Request #42: holo-files: Support patch files (#5)

108 of 108 new or added lines in 4 files covered. (100.0%)

2310 of 2865 relevant lines covered (80.63%)

297.44 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
cmd/holo-files/internal/impl/resource_script.go
2
100.0
cmd/holo-files/internal/impl/resource_static.go
10
100.0
cmd/holo-files/internal/impl/resource_patch.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
cmd/holo-files/internal/impl/resource.go
Jobs
ID Job ID Ran Files Coverage
1 221.1 05 Feb 2018 05:55AM UTC 0
80.63
Travis Job 221.1
2 221.2 05 Feb 2018 05:56AM UTC 0
80.63
Travis Job 221.2
Source Files on build 221
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #221
  • Pull Request #42
  • PR Base - master (#219)
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