703730e951d1904134032d596186b31631049982
[~madcoder/fosdem.git] / git.tex
1 \documentclass[10pt]{beamer}%{{{
2
3 \mode<presentation> {
4   \usetheme{Warsaw}
5   \setbeamercovered{transparent}
6 }
7
8 \usepackage[english]{babel}
9 \usepackage[utf8]{inputenc}
10 \usepackage{graphicx}
11
12 \usepackage{times}
13 %\usepackage[T1]{fontenc}
14 \newcommand{\git}{GIT}
15
16
17 \title{Packaging with \git}
18
19 \author{Pierre Habouzit}
20
21 \institute{FOSDEM 2008 - Debian Room}
22
23 \date{23 Feb. 2008}
24
25 \AtBeginSubsection[] {
26   \begin{frame}<beamer>{Why choosing \git}
27     \tableofcontents[currentsection,currentsubsection]
28   \end{frame}
29 }
30
31 \begin{document}
32
33 \begin{frame}
34   \titlepage
35 \end{frame}
36 %}}}
37 \section{Why choosing \git}%{{{
38
39 \begin{frame}{It's a DSCM [1/2]}
40   I've packaged with SVN on svn.debian.org for a long time…
41   \uncover<2->{\alert{well, it sucks}:}
42   \begin{itemize}
43     \item<3-> I wasn't able to work without network access;
44     \item<4-> I couldn't work incrementally: you have to get other's patches;
45     \item<5-> I couldn't "try and see" and maybe discard some work without
46               reverting patches: SVN never forgets;
47     \item<6-> I like having the full upstream source at hand, but svn explodes
48               doing that for large sources (KDE …).
49   \end{itemize}
50 \end{frame}
51
52 \begin{frame}{It's a DSCM [2/2]}
53   With \git, as a DSCM, most of the issues are gone.
54   \begin{itemize}
55     \item<2-> Offline work is possible, in fact you always work offline;
56     \item<3-> Incremental work is possible;
57     \item<4-> \git{} allow you to completely erase a wrong idea if you didn't
58               shared it yet;
59     \item<5-> \git{} storage is extremely efficient: the marginal cost of
60               commits decreases with the number of commits.
61   \end{itemize}
62
63   \vspace{1ex}
64
65   \uncover<6->{
66     GNU libc version 2.7 weights weights 115Mo unpacked. The full glibc
67     history (from before 1984) weights less than \alert{120Mo}.
68   }
69
70   \vspace{1ex}
71
72   \uncover<7->{
73     My experience shows that \git{} storage, for a project with quite some
74     history, is smaller than 2.5 times the size of the last upstream release
75     (unpacked).
76   }
77 \end{frame}
78
79 \begin{frame}{A real maintainer toolbox}
80   Though \git{} is special, because it was designed by a {\bf Maintainer}.
81   This has several implications:
82   \begin{itemize}
83     \item<2-> \git{} operations to look at the history are blazingly fast;
84     \item<3-> \git{} operations to integrate patches are blazingly fast;
85     \item<4-> \git{} supports advanced merging features;
86     \item<5-> \git{} has advanced patch manipulation features.
87   \end{itemize}
88
89   \vspace{1ex}
90
91   \uncover<6->{
92     In other words, \git{} is a suitable replacement for both SVN and
93     quilt\footnote{or your prefered patch system}.
94   }
95 \end{frame}
96
97 %}}}
98 \section{Repository layout}%{{{
99 \begin{frame}{The repository layout: upstream}
100   First of all, my repositories contain upstream sources.
101   \begin{enumerate}
102     \item<2-> if upstream uses a public SVN or \git{} repository, I track
103               their SCM under the {\tt upstream/*} namespace.
104     \item<3-> if upstream tarballs differ from the SCM, I also add a
105               {\tt upstream/tarballs} branch that replicates the tarball
106               directly.
107     \item<4-> if upstream only releases tarballs, I only have an
108               {\tt upstream} branch that is the successive import of tarballs.
109
110     \item<5-> last and not least, {\tt pristine-tar} helps me saving the
111               pristine upstream tarballs inside git.
112   \end{enumerate}
113 \end{frame}
114
115 \begin{frame}{The repository layout: upstream}
116   \vspace{1ex}
117   {\bf Demo}: tokyocabinet packaging:
118   \begin{itemize}
119     \item Step 1: importing upstream;
120     \item Step 2: backuping the orig.tar.gz.
121   \end{itemize}
122 \end{frame}
123
124 \begin{frame}{The repository layout: patches}
125   Second of all, instead of using quilt, I use a private git branch to hold my
126   patch queue (usually called {\tt \$origbranch+patches}). There are many
127   reasons to that:
128   \begin{itemize}
129     \item<2-> I only use one tool: \git{};
130     \item<3-> quilt doesnt know about diff3, hence isn't very practical for
131               partially merged patches;
132     \item
133     \item
134   \end{itemize}
135 \end{frame}
136 %}}}
137 \end{document}
138 % vim:tw=78: