Re: [PATCH 2/2] commit: add support for --fixup <commit> -m"<extra message>"
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 20, 2017, 20:03 UTC
- Message-ID
- <CAPig+cSeRZR7J9WSozTETVu=Y9N2wMRpoCgUkLXyzAaBOmTNZw@mail.gmail.com>
- In-Reply-To
- <20171220193845.11754-2-avarab@gmail.com>
On Wed, Dec 20, 2017 at 2:38 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> Add support for supplying the -m option with --fixup. Doing so has > errored out ever since --fixup was introduced. Before this, the only > way to amend the fixup message while committing was to use --edit and > amend it in the editor.
I can't tell, based upon this description, if '-m<msg> --edit' is a valid combination and, if so, does it correctly open the editor after appending <msg>?
Show 14 quoted lines
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > --- > diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh > @@ -272,6 +272,14 @@ test_expect_success 'commit --fixup provides correct one-line commit message' ' > commit_msg_is "fixup! target message subject line" > ' > > +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?