From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: "Rubén Justo" <rjusto@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] add-patch: edit the hunk again
Date: Mon, 16 Sep 2024 10:35:41 -0700 [thread overview]
Message-ID: <xmqq7cbbqz6a.fsf@gitster.g> (raw)
In-Reply-To: <cba63486-2186-4e8e-aad4-ed7f54606ec7@gmail.com> (Phillip Wood's message of "Mon, 16 Sep 2024 14:33:54 +0100")
Phillip Wood <phillip.wood123@gmail.com> writes:
> Because we know what the unedited patch
> looked like and that the pre-image lines should be unchanged it is
> possible to provide much better error messages than we get from trying
> to apply the whole patch with "git apply". It also makes it possible
> to restore deleted pre-image lines.
> ...
> [1] https://github.com/phillipwood/git/tree/wip/add-p-editing-improvements
> Note that the later patches do not even compile at the moment. I've
> been meaning to split out the first eight patches and clean them up
> as they're mostly functional and just need the commit messages
> cleaning up.
I'd love this. With both patches before and after the edit session,
we should be able to give more accurate line counts than having "git
apply" look at only the post-edit shape of the hunk, which wouldn't
see where any brokenness of the hunk comes from even if it wanted
to. We should probably be able to stop relying on "--recount" once
we do this right, which would be very nice outcome, too.
Thanks.
next prev parent reply other threads:[~2024-09-16 17:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 11:38 [PATCH] add-patch: edit the hunk again Rubén Justo
2024-09-16 13:33 ` Phillip Wood
2024-09-16 17:35 ` Junio C Hamano [this message]
2024-09-16 22:09 ` Rubén Justo
2024-09-18 10:06 ` phillip.wood123
2024-09-18 17:46 ` Rubén Justo
2024-09-18 17:51 ` [PATCH v2] " Rubén Justo
2024-09-23 9:07 ` phillip.wood123
2024-09-23 16:02 ` Junio C Hamano
2024-09-24 22:54 ` Rubén Justo
2024-10-01 10:02 ` Phillip Wood
2024-10-02 16:36 ` Rubén Justo
2024-09-28 14:30 ` [PATCH v3] " Rubén Justo
2024-10-01 10:03 ` Phillip Wood
2024-10-01 17:58 ` Junio C Hamano
2024-10-02 17:34 ` Rubén Justo
2024-10-02 17:27 ` Rubén Justo
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=xmqq7cbbqz6a.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=phillip.wood123@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=rjusto@gmail.com \
/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).