From 158dbe2bbad88af34cca5af605c1444e1efb4019 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 4 Jun 2019 03:08:44 +0200 Subject: Added Git branching and history graph A graph was added showing how Git branching and history are used to verfiy the integrity of the result. --- tex/git-branch.tex | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 tex/git-branch.tex (limited to 'tex/git-branch.tex') diff --git a/tex/git-branch.tex b/tex/git-branch.tex new file mode 100644 index 0000000..98234d3 --- /dev/null +++ b/tex/git-branch.tex @@ -0,0 +1,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} -- cgit v1.2.1