From: Christian Couder <christian.couder@gmail.com>
To: Konstantin Tokarev <annulen@yandex.ru>
Cc: git@vger.kernel.org
Subject: Re: Autosplit option for git add -p
Date: Sat, 8 Jun 2024 12:43:33 +0200 [thread overview]
Message-ID: <CAP8UFD3JM_h1BvK59R4wT1DeZyo6o-9T3GXGK8xE6vLnDMDCaQ@mail.gmail.com> (raw)
In-Reply-To: <20240607120530.74297526@yuvnserver>
Hi,
On Fri, Jun 7, 2024 at 11:06 AM Konstantin Tokarev <annulen@yandex.ru> wrote:
>
> Hello all,
>
> Is there any option in git to make `git add -p` split hunks by
> default, just like 's' was pressed automatically? If no, how would one
> implement such an option?
It doesn't look like there is any option to do that. About
implementing it, it depends if it would be a command line option or a
config option.
Anyway I think you might want to take a look at the run_add_p()
function in "add-patch.c".
> My use case: I've recently started working with big LaTeX document
> having every paragraph as a single line. As a result, hunks quickly
> become larger than screen, so that splitting is highly desirable.
Best!
next prev parent reply other threads:[~2024-06-08 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 9:05 Autosplit option for git add -p Konstantin Tokarev
2024-06-08 10:43 ` Christian Couder [this message]
2024-06-08 10:47 ` Dragan Simic
2024-06-08 18:53 ` Junio C Hamano
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=CAP8UFD3JM_h1BvK59R4wT1DeZyo6o-9T3GXGK8xE6vLnDMDCaQ@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=annulen@yandex.ru \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).