Skip to content

Let checkout -b take a start-point commit - #110

Open
mvanhorn wants to merge 1 commit into
initialcommit-com:mainfrom
mvanhorn:fix/109-checkout-b-start-point
Open

mvanhorn wants to merge 1 commit into
initialcommit-com:mainfrom
mvanhorn:fix/109-checkout-b-start-point

Conversation

@mvanhorn

Copy link
Copy Markdown

The command now accepts one optional start point with -b and validates that it resolves to a commit. Users cannot give checkout -b a commit, branch, or tag to start the new branch from.

The scene and validation test run passed all 48 tests, including the added abbreviated-commit checkout test, with one deprecation warning.

Fixes #109

The command now accepts one optional start point with -b and validates
that it resolves to a commit. The scene draws the target history when
needed, places the new branch and HEAD at the target, and keeps the
original branch at its previous commit. Remote-tracking start points
receive a remote label and an upstream explanation. The command title,
CLI help, and README include the new argument.

Fixes initialcommit-com#109

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@initialcommit-io

Copy link
Copy Markdown
Contributor

Hi @mvanhorn, thx for submitting this! Your timing is actually incredibly funny in a way, since I just pushed a large update to git-sim earlier today, releasing v0.4.0 which overhauls git-sim in multiple major ways that I believe make it a significantly better tool.

That being said, I don't believe the checkout -b takes the start point argument which is the purpose of this PR. Would you mind upgrading to git-sim v0.4.0 (latest on main) and resubmitting the PR against that version of the codebase?

I appreciate your time and contribution, and would love to get that fix merged in with you as the contributor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkout does not support specifying a commit.

2 participants