git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Ferris Nicolaisen <tfnico@gmail.com>, git@vger.kernel.org
Subject: Re: Revert a single commit in a single file
Date: Fri, 25 Feb 2011 21:05:02 +0100	[thread overview]
Message-ID: <AANLkTimRu13gfyoprwugxb0D64LZmSkSoJZBVLpTXOo3@mail.gmail.com> (raw)
In-Reply-To: <7vei6vao0p.fsf@alter.siamese.dyndns.org>

On Fri, Feb 25, 2011 at 20:54, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> But just like we now have:
>>
>>     Revert "some commit"
>>
>>     This partially reverts commit <sha1>.
>>
>> We could have with <path>:
>>
>>     Revert "some commit"
>>
>>     This partially reverts commit <sha1>. Only the path <path> has
>>     been reverted, which is X out of Y files changed in the original
>>     commit.
>>
>> Or something like that.
>
> Yes, that is exactly what I was suggesting, no?

Yes in the second paragraph, I was mainly just going to expand on it
and provide a suggestion.

But I mainly wanted to point out that not having this feature means
that people do completely manual reverts. So I think we'd have less
"broken" history (message), not more as a result of this sort of
thing.

> On the similar line of thought, it might be a good idea to update the
> commit template we give slightly perhaps like...
>
>     Revert "some commit"
>
>     This partially reverts commit <sha1>.
>    +#
>    +# DESCRBE HERE how the change in <sha1>
>    +# was a wrong thing to do.

Yes this looks very good. Aside from the UI issue of someone expanding
on why they did that *inside the comment* because that's what it suggests :)

    This partially reverts commit <sha1>.

    # DESCRIBE ABOVE ...

Would probably be better.

  reply	other threads:[~2011-02-25 20:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 10:34 Revert a single commit in a single file Thomas Ferris Nicolaisen
2011-02-25 11:17 ` Ævar Arnfjörð Bjarmason
2011-02-25 12:37   ` Michael J Gruber
2011-02-25 12:48     ` Dario Rodriguez
2011-02-25 13:05       ` Michael J Gruber
2011-02-25 14:38         ` Thomas Ferris Nicolaisen
2011-02-25 15:19           ` Dario Rodriguez
2011-02-25 18:53 ` Junio C Hamano
2011-02-25 19:43   ` Ævar Arnfjörð Bjarmason
2011-02-25 19:54     ` Junio C Hamano
2011-02-25 20:05       ` Ævar Arnfjörð Bjarmason [this message]
2011-02-25 20:22       ` Jay Soffian
2011-02-26  0:27         ` Dario Rodriguez

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=AANLkTimRu13gfyoprwugxb0D64LZmSkSoJZBVLpTXOo3@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=tfnico@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;
as well as URLs for NNTP newsgroup(s).