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] Git actions #5166

Open
otavioschwanck opened this issue Dec 15, 2022 · 2 comments
Open

[Feature] Git actions #5166

otavioschwanck opened this issue Dec 15, 2022 · 2 comments
Assignees
Labels
A-vcs Area: Version control system interaction C-enhancement Category: Improvements E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@otavioschwanck
Copy link

Would be awesome to have git actions on helix like:

On File:

  • preview hunk
  • revert hunk
  • stage hunk

Harder to do, but would be awesome:

Globally:

  • Search git changed files
@otavioschwanck otavioschwanck added the C-enhancement Category: Improvements label Dec 15, 2022
@kirawi
Copy link
Member

kirawi commented Dec 15, 2022

Partial duplicate of #4974

@kirawi kirawi added the A-vcs Area: Version control system interaction label Dec 15, 2022
@pascalkuthe pascalkuthe self-assigned this Dec 16, 2022
@pascalkuthe pascalkuthe added the E-medium Call for participation: Experience needed to fix: Medium / intermediate label Dec 16, 2022
@pascalkuthe
Copy link
Member

On File:

preview hunk
revert hunk
stage hunk

There is already #4974 for reverting a hunk that should be pretty easy.
Staging would probably work by writing to the git index (with a more generic diffput command) altough there are a ton of unanswered questions in the implementation of that.
A hunk preview could be covered by a quick way to toggle side by side diffs (#405).

Harder to do, but would be awesome:

file history (navigate between commits on file, see difs, etc)
time machine - go back on time on the file, like https://github.com/emacsmirror/git-timemachine

That is actually easier to implement (except if you want side by side diffs) but I am not sure if this is a good fit for core. These might be better delegated to plugin or external program.

Globally:

Search git changed files

I think this is better covered by adding a vcs status indicator to the file picker (#5116).
If a letter indicator is used there as in ( #5110) you could use the existing picker functionality to filter by the kind of change. I prefer filtering in the picker to separate commands as I forgot to type those/don't have them bound to a key bu default.

I would like a per buffer/global hunk picker tough which could be really handy for code review (especially if you could specify a commit as opposed to using the stage)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vcs Area: Version control system interaction C-enhancement Category: Improvements E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

3 participants