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

refactor(git): simplify parent branch detection alias #137

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

dgokcin
Copy link
Owner

@dgokcin dgokcin commented Nov 22, 2024

Summary

Simplifies the git parent alias by removing conditional logic and keeping only the essential command to detect the main parent branch (main/master/develop).

Changes

  • Simplified parent git alias to directly return the first matching parent branch (main/master/develop)
  • Removed conditional checks for current branch type
  • Removed error message handling for cases when no parent branch is found

Additional Notes

  • The simplified version always returns the first matching parent branch (main/master/develop)
  • This change assumes that at least one of these branches exists in the repository
  • The new implementation is more concise and performs fewer operations

@dgokcin dgokcin merged commit ce026a5 into main Nov 22, 2024
5 checks passed
@dgokcin dgokcin deleted the simplify-git-parent branch November 22, 2024 12:53
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