Skip to content

Commit

Permalink
add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jan 20, 2024
1 parent 5f1f3b6 commit 5241a4f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,26 @@ def throw-error [
}
}

# bisect a worktree by running a piece of code repeatedly
#
# # Examples
# ```nushell
# # find a bug that was introduced in Nushell in `nushell/nushell
# gm repo bisect --good 0.89.0 --bad 4458aae {
# cargo run -- -n -c "def foo [x: list<string>] { $x }; foo []"
# }
# ```
# ```
# 724818030dd1de392c54788eab5030074d694ecd
# ```
# ---
# ```nushell
# # avoid running the test twice more if it is expensive and you're sure
# # `--good` and `--bad` are indeed "good" and "bad"
# gm repo bisect --good $good --bad $bad --no-check $test
# ```
export def "gm repo bisect" [
test: closure, # the code to run to check a given revision
test: closure, # the code to run to check a given revision, should return a non-zero exit code for bad revisions
--good: string, # the initial known "good" revision
--bad: string, # the initial known "bad" revision
--no-check, # don't check if `--good` and `--bad` are indeed "good" and "bad"
Expand Down

0 comments on commit 5241a4f

Please sign in to comment.