all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yurivkhan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to commit hunks using VC?
Date: Sat, 27 Oct 2018 02:57:09 +0700	[thread overview]
Message-ID: <CAP_d_8WScFj1gzG9oCAMn03HY_OAq2seGbKTVpL1TtuJe5nrbA@mail.gmail.com> (raw)
In-Reply-To: <jwvh8h8ebu9.fsf-monnier+gmane.emacs.help@gnu.org>

On Sat, Oct 27, 2018 at 2:47 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > 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.
>
> Whether you use "do ... undo" as above, or "cp foo foo.bak ... cp
> foo.bak foo" or "stash ... unstash" is up to you.  To me these are just
> minor variants of the same approach.

Essentially, yes, but do/undo operates on line level, cp on file
level, and stash/unstash on the whole working copy.

Also, the situation where you have one version of the line on the
branch, a different one in the working copy, and need to stage a third
one that differs from both of the above, is rare.



  reply	other threads:[~2018-10-26 19:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 13:26 How to commit hunks using VC? Diogo F. S. Ramos
2018-10-26 14:34 ` Dan Čermák
2018-10-26 15:56 ` Stefan Monnier
2018-10-26 16:43   ` Carlos Konstanski
2018-10-26 17:35   ` Eli Zaretskii
2018-10-26 18:44     ` Stefan Monnier
2018-10-26 19:34       ` Yuri Khan
2018-10-26 19:42         ` Stefan Monnier
2018-10-26 19:57           ` Yuri Khan [this message]
2018-10-26 19:59           ` Óscar Fuentes
2018-10-26 21:17             ` Stefan Monnier
2018-10-26 21:55               ` Óscar Fuentes
2018-10-26 22:16           ` Michael Heerdegen
2018-10-26 23:07             ` Stefan Monnier
2018-10-27  0:22               ` Michael Heerdegen
2018-10-26 18:03   ` Diogo F. S. Ramos
2018-10-26 18:48     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP_d_8WScFj1gzG9oCAMn03HY_OAq2seGbKTVpL1TtuJe5nrbA@mail.gmail.com \
    --to=yurivkhan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.