Skip to content
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

fix: cmdgit BranchExist should match full branch name #433

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

gustavkj
Copy link
Collaborator

What does this change

Makes BranchExist in cmdgit match the full branch name. Previously, it would incorrectly return true if an existing branch started with the same name as the configured branch in multi-gitter.

Notes for the reviewer

Added the test prior to implementing the fix and without the fix the test failed (as expected) when running with --git-type cmd.

Checklist

  • Made sure the PR follows the CONTRIBUTING.md guidelines
  • Tests if something new is added

@gustavkj gustavkj requested a review from lindell November 25, 2023 11:57
@gustavkj gustavkj changed the title fix: cmdgit should match full branch name fix: BranchExist in cmdgit should match full branch name Nov 25, 2023
@gustavkj gustavkj changed the title fix: BranchExist in cmdgit should match full branch name fix: in cmdgit BranchExist should match full branch name Nov 25, 2023
@gustavkj gustavkj changed the title fix: in cmdgit BranchExist should match full branch name fix: cmdgit BranchExist should match full branch name Nov 25, 2023
Copy link
Owner

@lindell lindell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Just a tab in the beginning of searched string as well.

PS. It's nice to create two commits for a bug fix like this. One for the tests, where you can see that the tests fails in the CI pipeline, and one with the fix where it becomes green again.

internal/git/cmdgit/git.go Outdated Show resolved Hide resolved
@gustavkj gustavkj force-pushed the fix/cmdgit-should-match-full-branch-name branch from 6b65c33 to 6614064 Compare November 25, 2023 14:06
@gustavkj gustavkj merged commit c7a6e69 into master Nov 25, 2023
16 checks passed
@gustavkj gustavkj deleted the fix/cmdgit-should-match-full-branch-name branch November 25, 2023 14:13
Copy link
Contributor

github-actions bot commented Jan 6, 2024

Included in release v0.49.1 🎉

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.

2 participants