Skip to content

fix: resolve unconditional fall-through bugs across core commands#78

Merged
Huerte merged 1 commit into
mainfrom
fix/control-flow-bugs
May 31, 2026
Merged

fix: resolve unconditional fall-through bugs across core commands#78
Huerte merged 1 commit into
mainfrom
fix/control-flow-bugs

Conversation

@Huerte
Copy link
Copy Markdown
Owner

@Huerte Huerte commented May 31, 2026

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactor / internal

Overview

Fixed a bunch of control-flow bugs found during the audit. The main issue was commands running downstream steps (like git add .) unconditionally even when the parent step was skipped or failed.

Changes

  • gitgo link: split into two explicit paths so we don't accidentally run git add . on existing repos with unwanted files.
  • gitgo push --select: added a skip_staging flag so it actually respects your interactive selection instead of committing everything anyway.
  • gitgo user login: added proper error raising for bad emails and missing ssh-keygen instead of just crashing.
  • gitgo user logout: inverted the order so we try to delete files first. this stops your git config from being wiped if the file deletion fails.
  • gitgo jump: wrapped the pull command in an else block so it stops trying to pull from main when you just created a brand new local branch.

How to Test

  1. pip install -e ".[dev]"
  2. Run gitgo push --select and pick a few files. Verify that only those files got committed.
  3. Run gitgo jump new-test-branch. Verify it checks out the branch without hanging to pull updates.
  4. Expected result: Everything works cleanly without staging files you didn't ask for.

Checklist

  • I tested my changes locally and they work
  • I updated CHANGELOG.md under the [Unreleased] section
  • I updated README.md (if I added or changed a command)
  • I added or updated tests for my change (if applicable)
  • My change does not break any existing commands

@Huerte Huerte merged commit 062d7f2 into main May 31, 2026
1 check passed
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