Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

In vanilla Magit I can use C-u s to do a "git add -N", can I do this with evil-magit? #67

Closed
fnune opened this issue Jun 14, 2019 · 9 comments

Comments

@fnune
Copy link

fnune commented Jun 14, 2019

I want to use git add -N with Magit.

       -N, --intent-to-add
           Record only the fact that the path will be added later.
           An entry for the path is placed in the index with no
           content. This is useful for, among other things, showing
           the unstaged content of such files with git diff and
           committing them with git commit -a.

This behavior is supported by vanilla Magit by using C-u s, it was implemented in this PR.

How can I do this with evil-magit?

P.S. Thank you for this package :)

@justbur
Copy link
Member

justbur commented Jun 18, 2019

I'm not sure how this would be handled in evil-magit. Do you have a key binding in mind?

@fnune
Copy link
Author

fnune commented Jun 18, 2019

I was thinking it could be the default s action when adding new files. A subsequent s could actually stage the changes?

@justbur
Copy link
Member

justbur commented Jun 19, 2019

It’s not a bad suggestion but I’d rather stay close to the way Magit works. I think that’s a suggestion that could be made on the Magit side.

@fnune
Copy link
Author

fnune commented Jun 19, 2019

What about just n? for git add -N or i<n>tent?

@justbur
Copy link
Member

justbur commented Jun 19, 2019 via email

@fnune
Copy link
Author

fnune commented Jun 19, 2019

How about capital I (i) for <i>ntent? Currently I get an "ignore" dialog but that also works with lowercase i. We could:

  • Keep lowercase i for the ignore dialog.
  • Use uppercase I for git add -N.

@justbur
Copy link
Member

justbur commented Jun 20, 2019

ok, worth a try. I added it in 91e5dfb

@fnune
Copy link
Author

fnune commented Jun 20, 2019

Cool! Thanks!

@fnune
Copy link
Author

fnune commented Jun 24, 2019

Working great on the new release btw.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants