Package 'bisectr'

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

Help Index


Install a package from source, for bisect tests.

Description

If the installation fails, the default behavior is to mark this commit as skip.

Usage

bisect_install(pkgdir = ".", on_fail = "skip")

Arguments

pkgdir

The directory to load from

on_fail

What to do if installation fails (default is to mark this commit as "skip")

Details

This function is usually used together with bisect_require.

See Also

bisect_require

bisect_load_all

bisect_source

bisect_runtest

bisect_return_interactive


Like load_all, but for bisect tests.

Description

If the package fails to load, the default is to mark this commit as skip.

Usage

bisect_load_all(pkgdir = ".", on_error = "skip")

Arguments

pkgdir

The directory to load from

on_error

What to do if loading throws an error (default is to mark this commit as "skip")

See Also

bisect_source

bisect_install

bisect_runtest

bisect_return_interactive


Load a package like require(), for bisect tests.

Description

If the package fails to load, the default behavior is to mark this commit as skip.

Usage

bisect_require(package, on_fail = "skip")

Arguments

package

Name of package

on_fail

What to do if loading fails (default "skip")

Details

This function is usually used together with bisect_install.

See Also

bisect_install

bisect_load_all

bisect_source

bisect_runtest

bisect_return_interactive


Prompt the user for an interactive good/bad/skip response and return the appropriate value (to be passed to bisect_runtest).

Description

Prompt the user for an interactive good/bad/skip response and return the appropriate value (to be passed to bisect_runtest).

Usage

bisect_return_interactive()

See Also

bisect_runtest

bisect_load_all

bisect_install

bisect_source


Run a test function for git bisect testing.

Description

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.

Usage

bisect_runtest(fun, on_error = "skip", msg = "Running test...")

Arguments

fun

The test function

on_error

What to do if running fun throws an error (default is to mark this commit as skip)

msg

A message to print to the console when running the test

Details

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.

See Also

bisect_load_all

bisect_install

bisect_source

bisect_return_interactive


Like source, but for bisect tests.

Description

If the file fails to load, the default is mark this commit as skip.

Usage

bisect_source(file, ..., on_error = "skip")

Arguments

file

The file to load

...

Other arguments to pass to source

on_error

What to do if loading throws an error (default is to mark this commit as "skip")

See Also

source

bisect_load_all

bisect_install

bisect_runtest

bisect_return_interactive


bisectr package

Description

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.