Title: | Tools to Find Bad Commits with 'git bisect' |
---|---|
Description: | Tools to find bad commits with git bisect. See https://github.com/wch/bisectr for examples and test script templates. |
Authors: | Winston Chang <[email protected]> |
Maintainer: | Winston Chang <[email protected]> |
License: | GPL-2 |
Version: | 0.2.0 |
Built: | 2024-12-23 04:15:32 UTC |
Source: | https://github.com/wch/bisectr |
If the installation fails, the default behavior is to mark this commit as skip.
bisect_install(pkgdir = ".", on_fail = "skip")
bisect_install(pkgdir = ".", on_fail = "skip")
pkgdir |
The directory to load from |
on_fail |
What to do if installation fails (default is to mark this commit as "skip") |
This function is usually used together with bisect_require
.
load_all
, but for bisect tests.If the package fails to load, the default is to mark this commit as skip.
bisect_load_all(pkgdir = ".", on_error = "skip")
bisect_load_all(pkgdir = ".", on_error = "skip")
pkgdir |
The directory to load from |
on_error |
What to do if loading throws an error (default is to mark this commit as "skip") |
require()
, for bisect tests.If the package fails to load, the default behavior is to mark this commit as skip.
bisect_require(package, on_fail = "skip")
bisect_require(package, on_fail = "skip")
package |
Name of package |
on_fail |
What to do if loading fails (default "skip") |
This function is usually used together with bisect_install
.
bisect_runtest
).Prompt the user for an interactive good/bad/skip response and return
the appropriate value (to be passed to bisect_runtest
).
bisect_return_interactive()
bisect_return_interactive()
If the function fun
returns "good"
or TRUE
,
quit and return a code to mark this commit as good.
If the function returns "bad"
or FALSE
,
quit and return a code to mark this commit as bad.
If the function returns "skip"
or NA
,
quit and return a code to mark this commit as skip.
If the function returns "ignore"
or NULL
, do nothing.
bisect_runtest(fun, on_error = "skip", msg = "Running test...")
bisect_runtest(fun, on_error = "skip", msg = "Running test...")
fun |
The test function |
on_error |
What to do if running |
msg |
A message to print to the console when running the test |
It is also important to set on_error
. This tells it what to
do when the test function throws an error. The default behavior is to
mark this commit as skip. However, in some cases, it makes
sense to mark this commit as bad if an error is thrown.
source
, but for bisect tests.If the file fails to load, the default is mark this commit as skip.
bisect_source(file, ..., on_error = "skip")
bisect_source(file, ..., on_error = "skip")
file |
The file to load |
... |
Other arguments to pass to |
on_error |
What to do if loading throws an error (default is to mark this commit as "skip") |
This package is used for creating test scripts to find bad commits with git bisect. For example test scripts, see https://github.com/wch/bisectr.