all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: emacs-devel@gnu.org
Subject: Commit netiquette.
Date: Thu, 18 Feb 2010 00:44:23 +0100	[thread overview]
Message-ID: <87eikjzaug.fsf@telefonica.net> (raw)

It would be a Good Thing (TM) to explicitly set good practices for
commits. People is accustomed to CVS and following those customs with
changeset-based systems like Bazaar is counterproductive. VC history,
like code, is written once but read a thousand times, so it is worth to
write it with some care. A correct VC history can be exploited by tools
that traverses it doing useful things (i.e. `bisect').

Let's look at one example:

revno: 99513
committer: Mark A. Hershberger <mah@everybody.org>
branch nick: local
timestamp: Wed 2010-02-17 16:39:21 -0500
message:
  2010-02-17  Mark A. Hershberger  <mah@everybody.org>
  
  	* vc-bzr.el: fix typo in Known Bugs section.
  
  	* isearch.el (isearch-update-post-hook): New hook
  	(isearch-update): Use the new hook.
modified:
  lisp/ChangeLog
  lisp/isearch.el
  lisp/vc-bzr.el

The Committer used the full Changelog entry as the commit message, so on
interfaces that just shows the first line of the commit (like the
emacs-diffs mailing list or the output of `bzr log --short' or `qlog')
you see

2010-02-17  Mark A. Hershberger  <mah@everybody.org>

which is hardly indicative of the change.

Ideally, the commit message should be made of a first line indicating
the *purpose* of the change plus a longer text with a more complete
explanation. Usually the changelog entry is good enough as the complete
explanation (without the changelog's entry header!). If the changelog
entry contains only one line and it is descriptive of the purpose of the
change, it can be used as the commit message. In this case, it is
preferable to remove the leading asterisk because it just adds noise and
some text-based tools use asterisks for denoting nodes on the DAG.

Another very important thing is to realize that a changeset-based VCS
presents a view of the progress as a series of atomic steps that changes
the content of the project. This is good because it allows to
unambiguously establish the state of the project at certain point and
identify the steps that caused that state. For this to be really useful,
it is very important to not divide a change among several commits
(i.e. by doing a commit for each edited file) and to not mix different
changes on the same commit, as the case above.





             reply	other threads:[~2010-02-17 23:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 23:44 Óscar Fuentes [this message]
2010-02-18  0:27 ` Commit netiquette Glenn Morris
2010-02-18  0:51   ` Óscar Fuentes
2010-02-18  5:35     ` Glenn Morris
2010-02-18  7:13       ` Chong Yidong
2010-02-18 15:11         ` Mark A. Hershberger
2010-02-18 14:45 ` Alfred M. Szmidt
2010-02-18 15:12   ` Juanma Barranquero
2010-02-18 16:14     ` Stefan Monnier
2010-02-19  3:42       ` David Reitter
2010-02-19  5:32         ` Stefan Monnier
2010-02-19  8:17       ` Alfred M. Szmidt
2010-02-19 18:19         ` Stefan Monnier
2010-02-20 11:02           ` Chong Yidong
2010-02-20 11:06         ` Chong Yidong
2010-02-23 19:25           ` Alfred M. Szmidt
2010-02-19  8:17     ` Alfred M. Szmidt
2010-02-19  8:39       ` Juanma Barranquero
2010-02-20 12:37         ` Alfred M. Szmidt
2010-02-20 14:13           ` Miles Bader
2010-02-20 14:23             ` Eli Zaretskii
2010-02-22  2:17               ` Miles Bader
2010-02-22  4:14                 ` Eli Zaretskii
2010-02-23 16:37                   ` Stefan Monnier
2010-02-23 19:25               ` Alfred M. Szmidt
2010-02-20 18:55           ` Juanma Barranquero
2010-02-23 19:25             ` Alfred M. Szmidt
2010-02-23 20:28               ` Juanma Barranquero
2010-02-23 22:09                 ` David Kastrup
2010-02-23 22:57                   ` Juanma Barranquero
2010-02-18 15:40   ` Óscar Fuentes
2010-02-19  0:22     ` Stephen J. Turnbull
2010-02-19  7:53   ` Miles Bader
2010-02-18 15:15 ` Mark A. Hershberger

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=87eikjzaug.fsf@telefonica.net \
    --to=ofv@wanadoo.es \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.