# Commit message problem of reverting multiple commits

2 messages from 2012-11-13 to 2012-11-13. Participants: 乙酸鋰, Junio C Hamano.
Thread: https://gitlist.dev/t/32098

## 乙酸鋰, 2012-11-13 15:15

Subject: Commit message problem of reverting multiple commits
Message-ID: <CAHtLG6Qn68TFVnd_8LSf6OMqHZduAFgk0Hd46E3vKgFHCjpksQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAHtLG6Qn68TFVnd_8LSf6OMqHZduAFgk0Hd46E3vKgFHCjpksQ%40mail.gmail.com

```
Hi,

I ran git 1.8.0 command line

git revert --no-commit rev1 rev2

I see a prepared commit message like

Revert "<description from one commit>"
This reverts commit <SHA1 of one commit>.


The actual revert content is correct - it is all the relevant commits
that were selected. I expect the message to reflect this:

Revert "<description from commit1>", "<description from commit2>"
This reverts commits <SHA1 of commit1>, <SHA1 of commit2>.

Regards,
ch3cooli

```

## Junio C Hamano, 2012-11-13 16:34

Subject: Re: Commit message problem of reverting multiple commits
Message-ID: <7vd2zhfoly.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vd2zhfoly.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAHtLG6Qn68TFVnd_8LSf6OMqHZduAFgk0Hd46E3vKgFHCjpksQ@mail.gmail.com>

```
乙酸鋰 <ch3cooli@gmail.com> writes:

> I ran git 1.8.0 command line
>
> git revert --no-commit rev1 rev2
>
> I see a prepared commit message like
>
> Revert "<description from one commit>"
> This reverts commit <SHA1 of one commit>.
>
>
> The actual revert content is correct - it is all the relevant commits
> that were selected. I expect the message to reflect this:
>
> Revert "<description from commit1>", "<description from commit2>"
> This reverts commits <SHA1 of commit1>, <SHA1 of commit2>.

Hrmph.  I actually think the revert-content is not correct.

I think the command should not take more than one commit on the
command line when --no-commit is in use in the first place (the same
thing can be said for cherry-pick).  After all, "git revert rev1
rev2" is to revert rev1 and then rev2 independently, so unless that
option is spelled "--squash", the resulting history should have two
commits that reverts rev1 and rev2 independently.

```
