-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1/15] feat(bisect): add guessing game example #1220
Merged
arxanas
merged 9 commits into
master
from
arxanas/feat-bisect-add-guessing-game-example
Feb 11, 2024
Merged
[1/15] feat(bisect): add guessing game example #1220
arxanas
merged 9 commits into
master
from
arxanas/feat-bisect-add-guessing-game-example
Feb 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In doing this, I improved some of the comments/assertions on the consumer interface that became apparent when implementing the example. I found some bugs by hand while testing and proptest also found the same bugs.
arxanas
changed the title
feat(bisect): add guessing game example
[1/15] feat(bisect): add guessing game example
Feb 11, 2024
This was referenced Feb 11, 2024
I forgot that we have a container type for the success+failure bounds, so use that here.
So that we can use this logic in `git-branchless-submit`, which wants to be fundamentally aware of commit stacks as part of submitting.
So that we can call e.g. `Repo::create_branch` and ignore the error if the branch already exists.
It was previously assumed that all forges would want to create and operate on branches, and, in fact, the calling `git-branchless-submit` code would even create the branches returned by `CreateStatus`. This has turned out not to be the case. For example, the Phabricator forge embeds the commit identifier in the (updated) commit message, and doesn't need a branch (and, in practice, it's turned out to be more annoying than useful to create the branches as shorthand identifiers). This commit removes the auto-branch-creation behavior and updates the terminology to be branch-agnostic and refer to "commits" instead of "branches". As a result, commits are now "submitted" at the beginning of their submission lifecycle, and future pushes (etc.) are "updates". This doesn't exactly make sense with the name of the `--create` flag, since we never refer to "creating" a commit anywhere, only "submitting" one, so we might want to change that flag name or terminology in the future.
Not used now, but might be used in the future to generate local-friendly branch names for the Github forge.
I noticed that relative timestamps were enabled in the cloned repo's smartlog. That kind of output is non-deterministic, so it can't go into snapshot tests. To fix this, invoke the same configuration that we do to initialize repositories normally.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack:
Bounds
toStrategy::midpoint
#1221query_stack_commits
toDag
#1222GitErrorCode
fromrepo
#1223SubmitStatus::Local
#1224Branch::rename
method #1226Git::clone_repo_into
#1227RUST_LOG
environment variable #1229⊘
to◌
for synthetic omitted-commit nodes #1230git-next
tests #1231testing
module #1232feat(bisect): add guessing game example
In doing this, I improved some of the comments/assertions on the consumer interface that became apparent when implementing the example.
I found some bugs by hand while testing and proptest also found the same bugs.