On Wed, Dec 20, 2017 at 4:40 PM, Ævar Arnfjörð Bjarmason
<ava...@gmail.com> wrote:
> On Wed, Dec 20 2017, Eric Sunshine jotted:
>> On Wed, Dec 20, 2017 at 2:38 PM, Ævar Arnfjörð Bjarmason
>> <ava...@gmail.com> wrote:
>>> +test_expect_success 'commit --fixup -m"something" -m"extra"' '
>>> +       commit_for_rebase_autosquash_setup &&
>>> +       git commit --fixup HEAD~1 -m"something" -m"extra" &&
>>> +       commit_msg_is "fixup! target message subject linesomething
>>> +
>>> +extra"
>>> +'
>>
>> Hmm, so the first -m appended to the "fixup!" line, but the second -m
>> appended after a blank line? That doesn't seem very intuitive.
>>
>> Also, doesn't the text following "fixup!" need to exactly match the
>> summary line of the commit message in order for "git rebase -i
>> --autosquash" to work? Am I overlooking something obvious?
>
> It does the right thing and it's actually
> "$fixup_line\n\n$first_m\n\n$second_m" etc. It's just that this
> commit_msg_is function is testing against the "%s%b" format, so the
> first line of the body comes right after the subject.

Thanks for explaining. I guess I should have delved into
commit_msg_is() before commenting.

Reply via email to