aboutsummaryrefslogtreecommitdiff
path: root/tex/git-branch.tex
blob: 98234d3efc7204949d22897eda121f278e3ca44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
\begin{columns}
  \column{5cm}
  \vspace{-0.4cm}

  \begin{tikzpicture}

    \draw [white] (0,0) -- (0,8.3);

    %% Template branch.
    \ifdefined\tofuture
    \draw[->, line width=2mm] (0,0) -- (0,8.2);
    \else
    \draw[->, line width=2mm] (0,0) -- (0,6.5);
    \fi

    %% Project branch.
    \ifdefined\projbranch
      \draw[line width=2mm] (0,1.5) -- (1,2);
      \ifdefined\tofuture
        \draw[->, line width=2mm] (0.95,1.92) -- (0.95,8);
      \else
        \draw[->, line width=2mm] (0.95,1.92) -- (0.95,7);
      \fi
    \fi

    %% Merge link
    \ifdefined\mergebranch
    \draw[line width=2mm] (0,5.5) -- (0.95,6.05);
    \fi

    %% Template commits.
    \ifdefined\tofuture
      \foreach \y in {0.55,...,7.55}
      \draw [fill=green!80!blue, opacity=0.5] (0,\y) circle [radius=2.1mm];
    \else
      \foreach \y in {0.55,...,6.5}
      \draw [fill=green!80!blue, opacity=0.5] (0,\y) circle [radius=2.1mm];
    \fi

    %% Project commits.
    \ifdefined\projbranch
      \draw[anchor=north] (1,1.7) node {Project};

      \ifdefined\tofuture
        \foreach \y in {2,...,7.55}
        \draw [fill=red!60!green, opacity=0.5] (0.95,\y) circle [radius=2.1mm];
      \else
        \ifdefined\mergebranch
          \foreach \y in {2,...,6.5}
          \draw [fill=red!60!green, opacity=0.5] (0.95,\y) circle [radius=2.1mm];
        \else
          \foreach \y in {2,...,5}
          \draw [fill=red!60!green, opacity=0.5] (0.95,\y) circle [radius=2.1mm];
        \fi
      \fi
    \fi

    \draw[anchor=north] (0,0) node {Template};

    %% Happy scientist
    \ifdefined\githappy
    \node [inner sep=0pt] at (3.5,6) {\includegraphics[width=2cm]{img/happy.jpg}};
    \node [inner sep=0pt] at (4.15,7.3) {\includegraphics[width=0.2cm]{img/checkmark.png}};
    \draw[anchor=east] (2.4,7) node {\footnotesize\texttt{5cfe2eab}};
    \draw[anchor=south] (4.5,7) node [rotate=20] {\tiny\texttt{5cfe2eab}};
    \fi

  \end{tikzpicture}

  \column{6cm}
  \begin{itemize}
    \setlength\itemsep{0.6cm}
  \item Template's history is recorded.
    \ifdefined\projbranch
  \item New projects: a branch in the history.
    \fi
    \ifdefined\mergebranch
  \item Low-level updates in the template can always be imported into
    a project.
    \fi
    \ifdefined\tofuture
  \item The template and project will \alert{evolve}.
    \fi
    \ifdefined\githappy
  \item Upon publication, the \alert{Git hash} is enough to verify the
    integrity of the result.
  \item During research this encourages creative tests on any step.
    \fi
  \end{itemize}
\end{columns}