From: "Philip Oakley" <philipoakley@iee.org>
To: "Robert Dailey" <rcdailey.lists@gmail.com>, "Git" <git@vger.kernel.org>
Subject: Re: Fixup of a fixup not working right
Date: Fri, 2 Sep 2016 23:24:16 +0100 [thread overview]
Message-ID: <55512A8927384A0790DDC7F526B09053@PhilipOakley> (raw)
In-Reply-To: CAHd499AQFDRps6POF2xuUjbYv5DJYxt3DA8aFFArXF=qQEz_CA@mail.gmail.com
From: "Robert Dailey" <rcdailey.lists@gmail.com>
> Suppose I have a branch with 4 commits, in the following order (as you
> might see during interactive rebase):
>
> pick 123 Original Change
> pick 789 fixup! Original Change
> pick 456 Some Other Thing
> pick abc fixup! fixup! Original Change
>
> However, let's say the first commit is already pushed upstream on a
> topic branch. Since there are multiple developers on this topic
> branch, I do not want to rebase right now. Instead, I want to document
> future fixups via fixup commits and then when we're ready to merge, do
> a final rebase prior to the merge to master to clean things up after
> we're all done collaborating.
>
> For this specific situation, since the first commit is already pushed,
> I want to perform a fixup on the 1st fixup commit. When I perform an
> interactive rebase against upstream topic, I get the following:
>
> pick 789 fixup! Original Change
> pick 456 Some Other Thing
> pick abc fixup! fixup! Original Change
>
> The tip commit (abc in this case) is not marked as a fixup. What I
> expect to see is:
>
> pick 789 fixup! Original Change
> fixup abc fixup! fixup! Original Change
> pick 456 Some Other Thing
>
> Is this by design, or a defect? I assumed that Git would only look at
> the first occurrence of "fixup!" and treat everything else after as
> the commit description to match. But it seems in this case that it
> stops at the last occurrence of "fixup!", which would explain why it
> isn't matching in the interactive rebase. I haven't looked at the
> code, though.
As I understand this it's implied by design. The issue is that the rebase is
looking for that named commit within its current rebase range, and can't
find it, so ignores it.
There is a separate issue that all the fixup! fixup! messages are
essentially treated as being concatenations of the original fixup!, no
matter how many time the fiup is present.
In the mean time you should reword those commit messages as being
'bug-fixes' as they are (you say) already upstream and hence published. You
can make the first as a bug-fix and the following ones a fixup!s.
>
> Thoughts? Also I'm perfectly willing to accept feedback involving me
> just using the feature wrong or as not intended. Thanks in advance.
>
next prev parent reply other threads:[~2016-09-02 22:24 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 [this message]
2016-09-03 2:22 ` Junio C Hamano
2016-09-03 14:12 ` Robert Dailey
2016-09-03 22:33 ` Philip Oakley
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=55512A8927384A0790DDC7F526B09053@PhilipOakley \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--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