discussion and development of piem
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: piem@inbox.kyleam.com
Subject: Re: Applying the same patch multiple times
Date: Wed, 27 Apr 2022 20:46:24 +0800	[thread overview]
Message-ID: <87mtg68zj3.fsf@localhost> (raw)
In-Reply-To: <8735hzi3t8.fsf@kyleam.com>

Kyle Meyer <kyle@kyleam.com> writes:

> Ihor Radchenko writes:
>> My starting point is the patch-containing email. Then, I run piem-am and
>> use the default automatically generated branch.
> Interesting, using the email as the staring point for jumping to a
> branch isn't a use case that I've considered, but, yeah, I can see why
> that's appealing.

Strictly speaking, I do not start from email. Rather I capture an Org
heading from email and assign a TODO keyword. The heading is linked back
to the email. Hence, when I start working on the patch, I jump from the
heading to linked email and then to the working branch.

>> Observed behaviour: Because the branch already exists and the patch is
>> already applied, git am throws an error.
> Odd.  I expected the git-checkout call upstream of git-am to fail
> (saying something like "fatal: a branch named 'blah' already exists").
> Testing quickly, that's what I see on my end.
> (Either way, that's of course not your desired behavior.)

To clarify, by error I meant "branch already exists". So, it is the same
on my end.

>> I think a more useful approach would be something like:
>> 1. piem creates a throwaway branch and apply the patch in the email
>> 2. piem rebases the existing branch onto that throwaway branch
> I'm not quite connecting this (1)...
>> That way, I can start working on a patch from email, possibly add some
>> followup commits and still be able to return to this WIP branch starting
>> from the patch email.
> ...to this (2).  2 more or less aligns with how I understood the rest of
> your email, but I don't see where 1 comes in.  If you already applied a
> patch from a particular message, that patch isn't changing, so wouldn't
> you just want to jump to the associated branch, even if you amended the
> given commit and/or added commits on top?

Let me clarify what I had in mind.

Consider that I start working on a patch at some point. I apply it to a
new branch using piem-am. Then, I happen to make changes to the patch
and run out of time to work. The changes are left on the git branch.

Days or weeks later I return to my work on the patch. Again, the
starting point is the patch email, not the git branch. I do not exactly
recall whether I did any changes to the patch. I again run piem-am. I
wish that piem-am reminds me about the old WIP state of the patch.

One way to remind me about my local amendments is highlighting that
there is a difference between the original patch in the email and the
working branch. This difference can be shown e.g. by rebase conflict.
This is where my (1) and (2) are coming from.

Similar approach might be used to work with updated versions of the
patch. Updates are rarely done with reroll count + interdiff.
Highligting the difference between previous and current patches in the
thread would be helpful. Though this second idea is probably more
complicated compared to the above.


  reply	other threads:[~2022-04-27 12:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  7:48 [FR] Support multiple repositories associated with the same ML Ihor Radchenko
2022-04-24 22:12 ` Kyle Meyer
2022-04-26  9:19   ` Applying the same patch multiple times (was: [FR] Support multiple repositories associated with the same ML) Ihor Radchenko
2022-04-27  3:49     ` Applying the same patch multiple times Kyle Meyer
2022-04-27 12:46       ` Ihor Radchenko [this message]
2022-05-07 14:19         ` Kyle Meyer
2022-05-06  1:40   ` [PATCH] piem-inboxes: Support mapping inbox to multiple coderepos Kyle Meyer
2022-05-06  2:10     ` Ihor Radchenko
2022-05-06  3:28       ` Kyle Meyer
2022-05-07  5:21         ` Ihor Radchenko
2022-05-07 14:18           ` Kyle Meyer

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:

  List information: https://git.kyleam.com/

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

  git send-email \
    --in-reply-to=87mtg68zj3.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \


* 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


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).