Re: Make commit messages optional

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

 



On 2022-04-08 at 03:35:04, jurgen_gjoncari@xxxxxxxxxx wrote:
> I think that often commit messages are unnecessary. I propose that by
> default a user should be able to commit without a message. 

This topic comes up from time to time and you can see the previous
discussion in the archives.  The reasons we haven't done this are
roughly as follows.

First, writing commit messages is a way of communicating to others about
your changes, as well as to future you.  In my experience, it is
substantially more important in software engineering to communicate
clearly and effectively than it is to write code.  The computer will
accept anything that runs, but when you write code others must read it
and change it, and they must have the appropriate context behind those
changes to evaluate your changes and to make their own in the future.
We want to encourage good software engineering practices.

Tools like git log use the commit message, and empty commit messages
mean that viewing the list of commits is completely useless without
viewing a diff.  This means that functionality such as `git log --graph`
is just completely broken.  Writing even one line in the commit summary
makes a massive difference in the usability of these tools.

Users who want this behaviour can use --allow-empty-message or create an
alias with that option.  The functionality already exists.  I use
aliases extensively in my development and I know others do as well, so
this shouldn't be an impediment if you're working on projects where this
is acceptable.

> I don't think this would be a problem from the UX point of view,
> because a user could get a lot of information about a change, from the
> history of the GitHub repository, such as from the time of change, and
> seeing the diff. 

I certainly hope when you are writing code that you explain your changes
somewhere.  I know some people who use pull requests prefer to do so in
the pull request rather than the commit message, but I for one would
never accept a change that doesn't contain some sort of explanation
about why it's valuable or relevant somewhere.  I am, unfortunately, not
omniscient, so I need people to communicate their intentions and
decisions to me, and the best way to do that is with words.

I should also point out that the GitHub UI is specifically designed to
show the commit summary in the history view, so GitHub intends for you
to write at least one line of helpful text (the summary) in this
context.

Overall, I don't believe your proposal is likely to gain traction here
for the reasons I mentioned above, and I personally don't support it.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux