git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rubén Justo" <rjusto@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>,
	Phillip Wood <phillip.wood123@gmail.com>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v3] add-patch: edit the hunk again
Date: Wed, 2 Oct 2024 19:34:02 +0200	[thread overview]
Message-ID: <ee33072c-8759-4c42-ad36-3c33ef5d1c57@gmail.com> (raw)
In-Reply-To: <xmqqv7ybyabs.fsf@gitster.g>

On Tue, Oct 01, 2024 at 10:58:15AM -0700, Junio C Hamano wrote:

> I would not
> complain if we offered the feature to re-edit

I'm using this:

   $ GIT_EDITOR='bash -c "vim \"$1\" && cp -f $1 /tmp/backup"' git add -p

That way, I have a copy of the edited hunk in case I want to try again
or review it.  In that case, I can simply try again and reload from
"/tmp/backup".

I'm sure there's a more clever way, but I haven't come up with
anything more elegant.

Maybe interactive.editor, apply.editor, add.editor?

  reply	other threads:[~2024-10-02 17:34 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
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 [this message]
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=ee33072c-8759-4c42-ad36-3c33ef5d1c57@gmail.com \
    --to=rjusto@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@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.
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).