From: "Philip Oakley" <philipoakley@iee.org>
To: "Robert Dailey" <rcdailey.lists@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Cc: "Git" <git@vger.kernel.org>
Subject: Re: Fixup of a fixup not working right
Date: Sat, 3 Sep 2016 23:33:59 +0100 [thread overview]
Message-ID: <539B8BADEBFE4539ADC8B7EB60B23B5B@PhilipOakley> (raw)
In-Reply-To: CAHd499Bd7CHZ-O8HLd_iNnVNxz1C1=vO-4kxD80sEgBiesrMXg@mail.gmail.com
Hi Robert,
From: "Robert Dailey" <rcdailey.lists@gmail.com>
> On Fri, Sep 2, 2016 at 9:22 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Perhaps a change like this to "rebase -i":
>>
>> - The search for "original" when handling "pick fixup! original",
>> when it does not find "original", could turn it into "reword
>> fixup! original" without changing its position in the instruction
>> sequence.
>
[..]
> So this is mostly for my education, since I don't see a difference
> from a user-standpoint.
This was a problem in the past.
> Why would "fixup! fixup! original" look for
> "original" instead of "fixup! original"? As far as I can see, the
> behavior would be the same and the order would be retained since you
> are essentially "chaining" the fixups together this way.
The patch that introduced the effect is 22c5b13 (rebase -i: handle fixup!
fixup! in --autosquash, 2013-06-27). At the time it was possible that the
commits would be re-ordered based on the full multi-fixup message, and so,
if you thought you'd corrected a poor fixup, rather correcting the original,
the conceptual order would change. While the combined diffs still notionally
add to the same effect, the changes to the context lines may mean they don't
apply cleanly - keeping them in order makes for a clean application. The
solution was to ignore multiple fixup!s at the start.
> This also
> gives you the behavior you want directly because the algorithm will
> naturally tie to "fixup! original" even if "original" doesn't exist,
> because Git would expect that "fixup! original" will automatically
> manage its own order, and that subsequent processed nested "fixup!"
> commits would not need to depend on any other commits.
There is a question as to whether the commit you pushed upstream, is classed
as 'published' and immutable, or still part of the review and modification
process. At the moment the presumption, in general, is that it would be the
former, so that you can't fixup the original. I don't see that changing,
however Junio's suggestion that these extra fixups are 'reworded' so that
they will rebase (--autosquash) locally to become one commit titled
something like "fix! original", and then a final rebase that rewords that
commit back to "fixup! " for pushing upstream to the 'review' process, where
they can request that it be 'fixed';-)
next prev parent reply other threads:[~2016-09-03 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 19:24 Fixup of a fixup not working right Robert Dailey
2016-09-02 22:24 ` Philip Oakley
2016-09-03 2:22 ` Junio C Hamano
2016-09-03 14:12 ` Robert Dailey
2016-09-03 22:33 ` Philip Oakley [this message]
2016-09-04 7:36 ` Johannes Schindelin
2016-09-04 11:47 ` Philip Oakley
2016-09-05 7:53 ` Johannes Schindelin
2016-09-06 19:02 ` Philip Oakley
2016-09-07 11:31 ` Johannes Schindelin
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=539B8BADEBFE4539ADC8B7EB60B23B5B@PhilipOakley \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rcdailey.lists@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