2 ms·
When selecting only part of line, 's' will still stage the full line for me.
by gpderetta 5y ago
When selecting only part of line, 's' will still stage the full line for me.
- jolmg 5y agoIndeed. cd $(mktemp -d) git init echo bar > file.txt git add file.txt git commit -m "init" echo foo_bar_baz > file.txt # select only "foo_" in magit-status and press "s" git diff --cached will show diff --git a/file.txt b/file.txt index 5716ca5..2fd000c 100644 --- a/file.txt +++ b/file.txt @@ -1 +1,2 @@ bar +foo_bar_baz rather than the desired diff --git a/file.txt b/file.txt index 5716ca5..2fd000c 100644 --- a/file.txt +++ b/file.txt @@ -1 +1,2 @@ -bar +foo_bar I can't really imagine this feature working that well with just selection. Editing of the diff seems required. I just updated magit, too. It seems to have been published 3 days ago.
- NateEag 5y ago..huh. I just tested this in my Emacs instance and it works as you describe. I could swear I remember this working in the past, but I can find no hint of it in a few quick searches, so I'm likely mistaken. I'm sorry for the misinformation. Thanks for saying something.