Coding Style
------------

Use hard tabs. Tabs are _always_ 8 characters wide.

Don't use typedef if not really needed.  So instead of

	typedef struct {
		...
	} foo, *foop;

write this

	struct foo {
		...
	};

Keep style consistent with rest of the code.


Using GIT
---------

Clone my repo

	git clone git://onion.dynserv.net/git/cmus.git cmus

Run following commands in the cmus directory

Keep it up to date

	git pull

View commit log

	git log

What changed?

	# commit log only for pl.c
	git whatchanged pl.c

	# show commit log and diff output from 1.6.7 to HEAD
	git whatchanged -p 1.6.7..

Write an AAC plugin ;)

	# add your personal information to config
	# needed if you want to commit changes
	edit .git/config

	------------- 8< -----------------------------
	[user]
		name = "Random Developer"
		email = "random@site.com"
	------------- 8< -----------------------------

	# it's recommended to have separate branch for your own
	# modifications

	# create a new branch (aac) and switch to it
	git checkout -b aac

	# show current branch
	git branch

	# code code code
	# this is the easy part. do it just for fun [1]
	edit aac.c

	# what files you have changed?
	git status

	# show what you have changed
	git diff

	# add files, or tell git that you have changed some files
	# this marks files for commit
	git-update-index aac.c aac.h

	# when everything is ok, commit
	git commit

	# you can give git-commit the files you want to commit
	git commit foo.c

	# all
	git commit -a

	# update master branch
	# 1) change branch
	git checkout master
	# 2) pull changes
	git pull

	# change back to aac branch
	git checkout aac

	# merge with master
	git pull . master

	# create a patch from top most commit
	# creates 0001-name-of-the-commit.txt
	git format-patch HEAD^..

More: http://www.kernel.org/pub/software/scm/git/docs/everyday.html


Misc
----

If you have sparse installed:

	make C=2

Verbose build:

	make V=2


Patches
-------

Use git-format-patch to generate patches from commits. Alternatively you
can use "diff -up" if you don't want to use git.

Send patches to me: Timo Hirvonen <tihirvon@gmail.com>

---

[1] meaning of 'fun' inverted

vim: tw=72
