git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: James Harvey <jamespharvey20@gmail.com>,
	git@vger.kernel.org, gitster@pobox.com,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: Request: git add --interactive: split hunk: When can't split further, split on empty lines
Date: Thu, 30 May 2019 21:30:51 +0100	[thread overview]
Message-ID: <fb5fd48d-c5fe-57dc-c307-c959ad132da6@iee.org> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1905302136400.44@tvgsbejvaqbjf.bet>

Thanks for the clarification. Funny that we are "staging" the patch 
preparation to avoid real staging;-)

On 30/05/2019 20:43, Johannes Schindelin wrote:
> Hi Philip,
>
> On Thu, 30 May 2019, Philip Oakley wrote:
>
>> On 30/05/2019 15:53, Johannes Schindelin wrote:
>>> Having said that, there was a patch series recently to add the ability to
>>> stage individual lines,
>> I believe that the git-gui (in tk/tcl, but using git commands) was
>> already able to stage individual/selected lines, so there may be some
>> ideas from there.
> Sadly, no.
>
> There is one very big difference between Git GUI and `git add -p`: when
> you stage a line in Git GUI, it is staged *immediately*.
>
> When you stage a single line in the Git GUI, the diff you see in the
> window is reloaded. That is quite slow in the long run, and no fun.
>
> In contrast, `git add -p` does not stage *anything* until you're done
> selecting what you want to stage.
>
> Therefore, `git add -p` does have to do things quite a bit differently, as
> it will have to eventually build a single diff that is applied in one fell
> swoop, no matter how many lines you select individually.
>
> And naturally, there is also the difference between the user interfaces:
> while you can ask the user to select (part of) the line to stage in Git
> GUI via the mouse, that is not at all an option in `git add -p`.
>
> Likewise, the very convenient option to navigate via regular expressions
> in `git add -p` is not available in Git GUI at all.
>
> In short: I think that it makes more sense to come up with a design
> specific to `git add -p` and not get distracted by Tcl code that works
> quite differently.
>
> Ciao,
> Dscho


      reply	other threads:[~2019-05-30 20:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30  0:19 Request: git add --interactive: split hunk: When can't split further, split on empty lines James Harvey
2019-05-30 14:53 ` Johannes Schindelin
2019-05-30 19:26   ` Philip Oakley
2019-05-30 19:43     ` Johannes Schindelin
2019-05-30 20:30       ` Philip Oakley [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=fb5fd48d-c5fe-57dc-c307-c959ad132da6@iee.org \
    --to=philipoakley@iee.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jamespharvey20@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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 public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).