Re: Revert a single commit in a single file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 25, 2011 at 20:54, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Ãvar ArnfjÃrà Bjarmason <avarab@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]