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

counsel.el (counsel-git-log): Add counsel-git-log-show-commit-action. #2129

Closed
wants to merge 2 commits into from

Conversation

@leungbk
Copy link
Contributor

@leungbk leungbk commented Jul 11, 2019

counsel-git-log-show-commit-action uses Magit to visit the commit
corresponding to the currently selected log entry.

Use case for this feature: when you remember some part of a commit log and want to view the full diff, but the commit isn't the head of its containing branch and thus can't be directly accessed through counsel-git-checkout.

The proposed setting for counsel-git-log-split-string-re should be safe since git log outputs padding for commit bodies, precluding spurious matches.

Splitting with the newline character fails to chop off the first
occurrence of "commit".
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 15, 2019

Thanks. Do you have an Emacs CA?

Also, one remark: it's nice to run make compile and make test before submitting a PR. Right now you have a warning that can be fixed with:

(declare-function magit-show-commit "ext:magit-diff")

counsel-git-log-show-commit-action uses Magit to visit the commit
corresponding to the currently selected log entry.
@leungbk
Copy link
Contributor Author

@leungbk leungbk commented Jul 15, 2019

Thanks for your review, I've modified the commit with your suggested change. Though or some reason, running make compile and make test gives me no warnings with or without it.

I sent my Emacs CA several weeks ago to your Gmail address.

@abo-abo abo-abo closed this in 72a827a Jul 15, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 15, 2019

Merged, thanks.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
counsel-git-log-show-commit-action uses Magit to visit the commit
corresponding to the currently selected log entry.

Fixes abo-abo#2129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants