[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to commit hunks using VC?
From: |
Yuri Khan |
Subject: |
Re: How to commit hunks using VC? |
Date: |
Sat, 27 Oct 2018 02:34:16 +0700 |
On Sat, Oct 27, 2018 at 1:45 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> - I often find that I need to install only part of a hunk, which is
> easy to do if you go through "stash + edit + commit + unstash".
You have a pretty complex definition of easy.
In Magit, the status buffer displays a diff of my workspace against
the current branch, and I can stage lines in the marked region, or the
hunk at point, or the file at point, or all modified files, by
pressing ‘s’. Then, I commit by pressing ‘c c’.
If I need to commit a change that is finer than a single line, I can
press ‘RET’ on the relevant line in the diff, which takes me to the
buffer of the file at point, with point on the corresponding line. I
can edit the line, save the file, switch to the status buffer, stage
the line, switch back to the file, and undo the changes so that I
could put them in the next commit. Stash never enters the picture.
(If the goal is to use VC specifically, then I don’t know the answer.)
- How to commit hunks using VC?, Diogo F. S. Ramos, 2018/10/26
- Re: How to commit hunks using VC?, Dan Čermák, 2018/10/26
- Re: How to commit hunks using VC?, Stefan Monnier, 2018/10/26
- Re: How to commit hunks using VC?, Carlos Konstanski, 2018/10/26
- Re: How to commit hunks using VC?, Eli Zaretskii, 2018/10/26
- Re: How to commit hunks using VC?, Stefan Monnier, 2018/10/26
- Re: How to commit hunks using VC?,
Yuri Khan <=
- Re: How to commit hunks using VC?, Stefan Monnier, 2018/10/26
- Re: How to commit hunks using VC?, Yuri Khan, 2018/10/26
- Re: How to commit hunks using VC?, Óscar Fuentes, 2018/10/26
- Re: How to commit hunks using VC?, Stefan Monnier, 2018/10/26
- Re: How to commit hunks using VC?, Óscar Fuentes, 2018/10/26
- Re: How to commit hunks using VC?, Michael Heerdegen, 2018/10/26
- Re: How to commit hunks using VC?, Stefan Monnier, 2018/10/26
- Re: How to commit hunks using VC?, Michael Heerdegen, 2018/10/26
Re: How to commit hunks using VC?, Diogo F. S. Ramos, 2018/10/26