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

Feature: Add interactive git reflog #398

Merged
merged 4 commits into from
Sep 4, 2024
Merged

Conversation

sandr01d
Copy link
Collaborator

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

I do not use git reflog very often but when I do, I really miss forgits ergonomics - time to fix that!
The git reflog command is very similar to git log in almost every way, so I kept my implementation very close to _forgit_log. I was even able to reuse the log_enter and log_preview functions for it. The usage in forgit is exactly the same as with _forgit_log.

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:

@cjappl
Copy link
Collaborator

cjappl commented Aug 30, 2024

Could you recommend some good test cases to run through? This looks like a great improvement!

@sandr01d
Copy link
Collaborator Author

sandr01d commented Sep 1, 2024

Could you recommend some good test cases to run through?

This is what I focused on for my own testing:

  • Simply running the command grl
  • Diffing a single reflog by pressing enter on it
  • Copying a hash with ctrl+y
  • Passing options like grl --all
  • Usage as an alias for the git command, e.g. grl show refs/stash
  • Setting the different environment variables (FORGIT_REFLOG_FZF_OPTS, FORGIT_GRL_FORMAT & FORGIT_REFLOG_GIT_OPTS)

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.

Very nice improvement! Works well for me, thanks for the contribution. 👍

@sandr01d sandr01d merged commit be82c47 into wfxr:master Sep 4, 2024
4 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.

4 participants