cmus-remote: Read command results
[cmus.git] / HACKING
blobaff7d5507a58e6e9e99b40565458203c9bd22946
1 Coding Style
2 ------------
4 Use hard tabs. Tabs are _always_ 8 characters wide.
6 Don't use typedef if not really needed.  So instead of
8         typedef struct {
9                 ...
10         } foo, *foop;
12 write this
14         struct foo {
15                 ...
16         };
18 Keep style consistent with rest of the code.
21 Using GIT
22 ---------
24 Clone my repo
26         git clone git://onion.dynserv.net/git/cmus.git cmus
28 Run following commands in the cmus directory
30 Keep it up to date
32         git pull
34 View commit log
36         git log
38 What changed?
40         # commit log only for pl.c
41         git whatchanged pl.c
43         # show commit log and diff output from 1.6.7 to HEAD
44         git whatchanged -p 1.6.7..
46 Write an AAC plugin ;)
48         # add your personal information to config
49         # needed if you want to commit changes
50         edit .git/config
52         ------------- 8< -----------------------------
53         [user]
54                 name = "Random Developer"
55                 email = "random@site.com"
56         ------------- 8< -----------------------------
58         # it's recommended to have separate branch for your own
59         # modifications
61         # create a new branch (aac) and switch to it
62         git checkout -b aac
64         # show current branch
65         git branch
67         # code code code
68         # this is the easy part. do it just for fun [1]
69         edit aac.c
71         # what files you have changed?
72         git status
74         # show what you have changed
75         git diff
77         # add files, or tell git that you have changed some files
78         # this marks files for commit
79         git-update-index aac.c aac.h
81         # when everything is ok, commit
82         git commit
84         # you can give git-commit the files you want to commit
85         git commit foo.c
87         # all
88         git commit -a
90         # update master branch
91         # 1) change branch
92         git checkout master
93         # 2) pull changes
94         git pull
96         # change back to aac branch
97         git checkout aac
99         # merge with master
100         git pull . master
102         # create a patch from top most commit
103         # creates 0001-name-of-the-commit.txt
104         git format-patch HEAD^..
106 More: http://www.kernel.org/pub/software/scm/git/docs/everyday.html
109 Misc
110 ----
112 If you have sparse installed:
114         make C=2
116 Verbose build:
118         make V=2
121 Patches
122 -------
124 Use git-format-patch to generate patches from commits. Alternatively you
125 can use "diff -up" if you don't want to use git.
127 Send patches to me: Timo Hirvonen <tihirvon@gmail.com>
131 [1] meaning of 'fun' inverted
133 vim: tw=72