diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-06-04 03:08:44 +0200 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-06-04 03:08:44 +0200 |
commit | 158dbe2bbad88af34cca5af605c1444e1efb4019 (patch) | |
tree | e0bdfb697dd019201a973b9fd380f0cfc6514759 /tex | |
parent | 05593d91a4148d2c852e263995a170007dbfb628 (diff) |
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.
Diffstat (limited to 'tex')
-rw-r--r-- | tex/git-branch.tex | 90 | ||||
-rw-r--r-- | tex/project-graph.tex (renamed from tex/plot.tex) | 0 |
2 files changed, 90 insertions, 0 deletions
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} diff --git a/tex/plot.tex b/tex/project-graph.tex index 566a9e7..566a9e7 100644 --- a/tex/plot.tex +++ b/tex/project-graph.tex |