diff --git a/slides/img/first.png b/slides/img/first.png new file mode 100644 index 0000000000000000000000000000000000000000..f39de1c144894e99b3c5fcdf3fef439521886fe3 Binary files /dev/null and b/slides/img/first.png differ diff --git a/slides/img/second.png b/slides/img/second.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1e7b7dd62b730eb9be478e481a4cef4b1df2d2 Binary files /dev/null and b/slides/img/second.png differ diff --git a/slides/slides.qmd b/slides/slides.qmd index 94cfec6b56809bcb9d99dc3302843a20ca0c6a2f..95a59dab3f7eb460189902cdf5e048734f225920 100644 --- a/slides/slides.qmd +++ b/slides/slides.qmd @@ -7,7 +7,7 @@ date: last-modified date-format: full toc: true mainfont: calibri -monofont: Source Code Pro +monofont: SauceCodePro Nerd Font format: revealjs: center: false @@ -541,7 +541,7 @@ $ git co master <p><p> -## Mounting archives {.unnumbered .unlisted} +## Mounting archives Gblk provides the `mount` command to mount *one or many* archives of the results folder into the `.mount` directory. @@ -563,3 +563,142 @@ To resolve it just use gblk will *silently unmount* the archives before *commit*, *checkout*, *pre-checkout* and *mount* commands. ::: + + +## Mounting archives {.unnumbered .unlisted} + +Option of `mount` command: + +```bash +USAGE: + gblk mount [OPTIONS] + +OPTIONS: + -c, --commit <COMMIT> Commit name, sh: Glob is supported. This is an optional parameter: if + not set then all commit archives will be mounted into the .mount + directory + -d, --diff Displays the differences between two files mounted corresponding to the + given path + -h, --help Print help information + -l, --last <N> Consider last N archive after other filter were applied + -p, --path <PATH> The file/directory to extract. This is an optional parameter. If not + set then all files in the archive will be displayed + -v, --versions If set, displays the .mount directory in 'version view' +``` +<p><p> + + +## Mounting archives {.unnumbered .unlisted} + +Example usage: + +```bash +gblk mount +``` + +This command creates a `.mount` containing all archives of the results folder: + +```bash + .mount +├── 964fec75f58829c9642c9c2b675a4e1282d0d266 +│ └── results +│ ├── .gitignore +│ └── result.txt +└── df0eb55ce43fa48b652340183b5f9cc69daa2350 + └── results + ├── .gitignore + └── result.txt +``` + + +```bash +gblk mount --versions # version view +``` + +```bash + .mount +└── results + ├── .gitignore + │ └── .gitignore.00001 + └── result.txt + ├── result.00001.txt + └── result.00002.txt +``` +<p><p> + +## Mounting archives {.unnumbered .unlisted} + +**Displaying changes between files:** + +To display the changes of a results file named `result.txt` in our example between the tow last commits, we can enter + +```bash +$ gblk mount --last 2 -p results/result.txt # mounting the results/result.txt of the two last commits +``` +```bash + .mount +├── 964fec75f58829c9642c9c2b675a4e1282d0d266 +│ └── results +│ └── result.txt +└── df0eb55ce43fa48b652340183b5f9cc69daa2350 + └── results + └── result.txt +``` + +If two files are recovered this way, we can add the `--diff` option to the previous command: + +```bash +$ gblk mount --last 2 -p results/result.txt + +Δ .mount/df0eb55.../results/result.txt ⟶ .mount/964fec75.../results/result.txt +──────────────────────────────────────────────────────────────────────────────── +─────┐ +• 1: │ +─────┘ +│ 1 │result line │ 1 │result line +│ │ │ 2 │a newline +``` +<p><p> + + +## Mounting archives {.unnumbered .unlisted} + +To display the changes between one commit and the current results folder, only one target file must be recovered by the mount command: example with the `results/result.txt` file: + +```bash +$ gblk mount --commit '964fec75f588*' -p results/result.txt # mounting the results/result.txt of the two last commits +``` +```bash + .mount +└── 964fec75f58829c9642c9c2b675a4e1282d0d266 + └── results + └── result.txt +``` +```bash +$ gblk mount --commit 'df0eb55ce*' -p results/result.txt --diff # mounting the results/result.txt of the two last commits +``` + +If the selected file is not an image then `delta` display the chnages between the two files + +```bash +Δ .mount/df0eb55../results/result.txt ⟶ test_gbl/results/result.txt +───────────────────────────────────────────────────────────────────── +─────┐ +• 1: │ +─────┘ +│ 1 │result line │ 1 │result line +│ │ │ 2 │a newline +``` +<p><p> + + +## Mounting archives {.unnumbered .unlisted} + +**Displaying changes between images:** + +Let's consider the following images: + +::: {layout-ncol=2} +{width=40% height=40%} +{width=40% height=40%} +::: \ No newline at end of file