<?xml version="1.0"?>
<!DOCTYPE webpage
 PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
        "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">

<webpage id="developers-style">
  <config param="desc" value="Notes on development and code style"/>
  <config param="cvstag" value="$NetBSD: style.xml,v 1.2 2005/09/01 11:52:09 mishka Exp $"/>
  <config param="rcsdate" value="$Date: 2005/09/01 11:52:09 $"/>
  <head>

    <!-- Copyright (c) 1994-2003
    The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->

    <title>NetBSD Developer Documentation: Notes on development and
      code style</title>
  </head>

  <sect1 role="toc">

    <sect2 id="style">
      <title>Style</title>

      <sect3 id="commit">
	<title>Commit style - one thing at a time</title>
	<para>Except where unavoidable, separate commits should be made for:
	  
	  <itemizedlist>
	    <listitem>Machine-dependent commits</listitem>
	    <listitem>Machine-independent commits</listitem>
	    <listitem>bug-fix commits</listitem>
	    <listitem>feature-add commits</listitem>
	    <listitem>code-cleanup commits</listitem>
	    <listitem>ANSIfication commits</listitem>
	  </itemizedlist>
	</para>

	<para>While it may seem onerous to do the extra work to keep these
	  things separate, extra work for the committer means less work
	  for everyone else who goes to look at the changes later. There
	  are obvious grey areas - are two features appropriate for one
	  commit, or two - continue to use your judgement.</para>

	<para>All these actions help in the later use of cvs diff,
	  annotate, etc. </para>
      </sect3>

      <sect3 id="code">
	<title>Code style - "NetBSD source code style guide"</title>

	<para>A file entitled the <quote>NetBSD source code style
	  guide</quote> is located in the tree at <ulink 
	  url="http://cvsweb.NetBSD.org/bsdweb.cgi/src/share/misc/style?rev=HEAD&amp;content-type=text/x-cvsweb-markup">src/share/misc/style</ulink>.
	  If you haven't already, you want to read this as soon as
	  possible.</para>
      </sect3>
    </sect2>
  </sect1>
  <parentsec url="./" text="NetBSD Developer Documentation"/>
</webpage>

