Skip to content
Snippets Groups Projects
Verified Commit dd460e19 authored by nfontrod's avatar nfontrod
Browse files

slides/img/ slides/slides.qmd: update

parent 5f87dc1f
No related branches found
No related tags found
No related merge requests found
slides/img/first.png

138 KiB

slides/img/second.png

140 KiB

...@@ -7,7 +7,7 @@ date: last-modified ...@@ -7,7 +7,7 @@ date: last-modified
date-format: full date-format: full
toc: true toc: true
mainfont: calibri mainfont: calibri
monofont: Source Code Pro monofont: SauceCodePro Nerd Font
format: format:
revealjs: revealjs:
center: false center: false
...@@ -541,7 +541,7 @@ $ git co master ...@@ -541,7 +541,7 @@ $ git co master
<p><p> <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. 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 ...@@ -563,3 +563,142 @@ To resolve it just use
gblk will *silently unmount* the archives before gblk will *silently unmount* the archives before
*commit*, *checkout*, *pre-checkout* and *mount* commands. *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}
![first](img/first.png){width=40% height=40%}
![second](img/second.png){width=40% height=40%}
:::
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment