1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-10-04 00:27:19 +03:00
kakoune/doc
Johannes Altmanninger 54992c08ae rc git: teach "git apply" to work on content, not just diffs
Staging/unstaging/reverting (parts of) the current buffer's file can
be a common use case.

Today "git apply" can do that based on a selection within a diff.
When the selection is on uncommitted content, we can probably assume
that the intent is to use the part of the selection that overlaps
with the +-side of "git diff" (or "git diff --cached" for
"git apply --cached").

Make "git apply" treat selections as content if the buffile is
tracked by Git. This differentiator is not perfect but I don't know
why anyone would want to use the existing "git apply" semantics on
a tracked file. Maybe we should pick a different name.

This feature couples well with "git show-diff", which shows all
lines with unstaged changes (in future it should probably show staged
changes as well).

Whereas on diffs, "git apply" stages the entire hunk if the selection
contains no newline, this does not happen when operating on content.
I didn't yet try implementing that.  I guess the hunks are not as
explicit here.

Closes #5225
2024-09-16 15:23:18 +10:00
..
pages rc git: teach "git apply" to work on content, not just diffs 2024-09-16 15:23:18 +10:00
autoedit.asciidoc doc: fix typos and clarify some parts 2020-05-28 18:37:26 +02:00
coding-style.asciidoc doc: declare C++20 as the language version 2024-05-22 19:18:47 -04:00
design.asciidoc docs: minor grammar fix 2023-04-06 10:27:41 +00:00
interfacing.asciidoc Change completions option docstring element to be an arbitrary command 2019-04-17 08:38:52 +02:00
json_ui.asciidoc Fix json-ui scroll support 2024-08-14 21:32:03 +10:00
kak.1 Describe 'filter mode' in more detail. 2021-12-13 09:05:22 +11:00
kakoune_logo.svg Add logo proposal. 2015-03-22 14:09:32 +01:00
screenshot-i3.gif Add some screenshots to README 2015-05-07 00:34:50 +01:00
screenshot-tmux.gif Add some screenshots to README 2015-05-07 00:34:50 +01:00
writing_scripts.asciidoc doc writing_scripts: Document echo portability issues 2020-05-04 12:10:23 +00:00