From: Konstantin Kharlamov <hi-angel@yandex.ru>
To: Po Lu <luangruo@yahoo.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: ChangeLog and commit messages
Date: Mon, 19 Jun 2023 12:07:43 +0300 [thread overview]
Message-ID: <615704a18abdc3880a7e637e1903b81bcc9e50c8.camel@yandex.ru> (raw)
In-Reply-To: <87jzw06j1y.fsf@yahoo.com>
On Mon, 2023-06-19 at 14:51 +0800, Po Lu wrote:
> Konstantin Kharlamov <hi-angel@yandex.ru> writes:
>
> > Hmm, it seems it's an SVN workflow, because in git or Mercurial you can't
> > lock
> > file. I didn't have experience of working with SVN (fortunately, from what I
> > can
> > tell), but I think if I had to work with it I would use `git-svn`.
(actually, it turns out I did work with SVN in my first job. But it wasn't the
only VCS we used, so I remember close to nothing about that 😅)
> Most VCS have an option to perform locked check-outs of a file. Git and
> Mercurial are exceptions.
>
> > Anyway, I kind of wanted to see a commit you have troubles adding a title
> > for.
> > Judging by your first message here it's the same situation with commits to
> > Emacs, so you can drop some commit hash for example. I kind of can speculate
> > based on the general description of this SVN workflow, but it may be more
> > productive to look at specific cases where such problem arises.
>
> If you search for ``Update Android port'' in the feature/android branch,
> you will see what I mean.
Thanks, I see this commit, I'm looking.
So… From what I can see you have two separate changes in this commit. One is
"Only access width and height under lock", and another one… it is some
algorithmic change in the `onLayout()`, which I didn't study too closely, but
looking at the commit description I'm assuming it is "Send Expose upon layout
changes if the view has grown".
The problem you have here with making up a title is because you've got two
different functional changes inside one commit. Note that you had no trouble
writing what has changed inside the commit message. So, had you separated the
commit to two different ones, you would've gotten a commit title for free just
by looking at your commit message 😊
When someone mixes up different functional changes, all they can give as a title
is just "Refactor foo.c" or "Rework bar" or "Fix buzz". When later looking at
the shortlog these are pretty unhelpful titles, because it often says very
little about what really was done in the code.
It is worth noting that although Emacs does allow mixing up many changes in one,
a generally accepted good practice is to avoid that. Separating changes allows
for the author to easier figure out what went wrong, it makes review easier, and
when one have to revert an offending commit, it makes sure that unrelated good
changes won't be reverted together with the ones that broke something. In many
large projects such mixing up is not allowed and in code review the author will
be asked to separate the changes.
As an example, you can look at commit log in Mesa project¹. You can see that
each title uniquely determines what was changed, and in many cases such commits
are short.
P.S: btw, in the article² by a kernel maintainer that I referred elsewhere
there's also a good quote on your case:
> If it's not possible to describe the high level change in a few words, it is
most likely too complex for a single commit
1: https://gitlab.freedesktop.org/mesa/mesa/-/commits/main
2: http://who-t.blogspot.com/2009/12/on-commit-messages.html
next prev parent reply other threads:[~2023-06-19 9:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87a5wxb5sl.fsf.ref@yahoo.com>
2023-06-18 7:14 ` ChangeLog and commit messages Po Lu
2023-06-18 7:39 ` Eli Zaretskii
2023-06-18 7:41 ` Po Lu
2023-06-18 8:02 ` Eli Zaretskii
2023-06-18 14:50 ` Konstantin Kharlamov
2023-06-19 0:48 ` Po Lu
2023-06-19 6:25 ` Konstantin Kharlamov
2023-06-19 6:51 ` Po Lu
2023-06-19 9:07 ` Konstantin Kharlamov [this message]
2023-06-19 10:10 ` Po Lu
2023-06-19 11:57 ` Dmitry Gutov
2023-06-19 16:59 ` Eli Zaretskii
2023-06-19 17:24 ` Dmitry Gutov
2023-06-19 22:18 ` Konstantin Kharlamov
2023-06-19 16:33 ` Eli Zaretskii
2023-06-20 0:55 ` Po Lu
2023-06-23 6:50 ` Sean Whitton
2023-06-23 7:16 ` Eli Zaretskii
2024-08-27 4:23 ` Sean Whitton
2023-06-18 7:44 ` Sean Whitton
2023-06-18 22:38 ` Dmitry Gutov
2023-06-19 8:52 ` Jose E. Marchesi
2023-06-18 14:03 Bruno Haible
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=615704a18abdc3880a7e637e1903b81bcc9e50c8.camel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).