Skip to content

Feat: use git log completions for fixup commands #457

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

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

sandr01d
Copy link
Collaborator

@sandr01d sandr01d commented Jul 15, 2025

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation

Description

We currently only compelete local branch names for the fixup commands (fixup, squash & reword). Because these commands use git log internally, they actually support way more options, e.g. tags (to start the log from a tag) or files (to show only commits containing a specific file). With this PR, we make use the completions from git log instead.

While implementing this, I noticed that the completions for reword were not working with the aliases on bash, so I fixed this in 05fc6f8.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation change

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

@sandr01d sandr01d self-assigned this Jul 15, 2025
Copy link
Owner

@wfxr wfxr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@carlfriedrich carlfriedrich left a comment

Choose a reason for hiding this comment

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

Good idea, thank you!

@sandr01d sandr01d merged commit 7c3aff1 into wfxr:main Jul 16, 2025
3 checks 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.

3 participants