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

Check first for existing branches before creating them #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wrandall22
Copy link

This PR is another attempt at fixing issue #10 after the reversion in #12. I found the echo lines to be helpful, but we can delete them if desired.

@wrandall22
Copy link
Author

This needs more work still, unfortunately, GetBranch fails with an exception instead of returning an empty object when the branch does not exist, so this needs some error handling.

@wrandall22 wrandall22 marked this pull request as draft April 26, 2024 20:11
@wrandall22 wrandall22 force-pushed the handle-existing-branches branch 2 times, most recently from 103f05a to 97414c2 Compare April 26, 2024 20:55
@wrandall22
Copy link
Author

I believe this is working now (tested on a non-existing and existing branch). However, there is a side effect of a log in the console: sh: "branch":: unknown operand that shows up when the branch does exist.

@wrandall22 wrandall22 marked this pull request as ready for review April 29, 2024 14:01
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.

1 participant