You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require GNU getopt and leverage it for enhanced CLI option parsing with short options (#112)
* Initial plan
* Integrate GNU getopt for enhanced option handling in hug-cli-flags
Co-authored-by: elifarley <[email protected]>
* Update documentation to reflect -q short option and GNU getopt integration
Co-authored-by: elifarley <[email protected]>
* Make getopt a hard requirement and leverage it in git-bdel-backup
- Remove fallback to manual parsing in hug-cli-flags (getopt is now required)
- Update hug-cli-flags documentation to reflect getopt as a requirement
- Refactor git-bdel-backup to use getopt directly for all option parsing (common + custom)
- Update git-bdel-backup help text to show -q short option
- Update tests to match getopt's error messages
- Handle set -e interaction with getopt failures properly
Co-authored-by: elifarley <[email protected]>
* Add short options and leverage getopt in more commands
- Add -k and -o short options for --keep and --delete-older-than in git-bdel-backup
- Convert git-bc to use getopt with -t short option for --point-to
- Convert git-bpush to use getopt for all options
- Update help text and examples to show short options
- Update tests to match getopt error messages
Co-authored-by: elifarley <[email protected]>
* fix: correct getopt test grouping and improve error handling
Co-authored-by: aider (openai/Grok-4-Fast-Reasoning) <[email protected]>
* ♻️ Introduce centralized validate_commitish function
Refactor git-bc, git-bdel, and git-bdel-backup to use shared validation logic from hug-git-kit instead of duplicated git rev-parse checks. Improve error message clarity for --keep option in git-bdel-backup.
Centralizing commitish validation reduces duplication, ensures consistent error handling, and simplifies maintenance across hug git tools while preserving existing behavior.
* refactor: use validate_commitish for commit validation
Co-authored-by: aider (openai/Grok-4-Fast-Reasoning) <[email protected]>
* Fix tests to match validate_commitish error messages
Update test expectations to match the error messages from the new validate_commitish function introduced in recent commits. The function provides more descriptive error messages that include the context of where validation failed.
Co-authored-by: elifarley <[email protected]>
* refactor: consolidate validation by moving validate_commitish and dropping validate_commit
Co-authored-by: aider (openai/Grok-4-Fast-Reasoning) <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: elifarley <[email protected]>
Co-authored-by: Elifarley C <[email protected]>
Co-authored-by: aider (openai/Grok-4-Fast-Reasoning) <[email protected]>
0 commit comments