diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-18 12:39:22 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-18 12:39:22 +0800 |
| commit | 467443d37191c79e8ab7700e2d8d7e4e6666f9e5 (patch) | |
| tree | 55cea14662715989730356c23af4dae4b20aaf53 /docs | |
| parent | 5de5d5d72a9021125272977a6ca2ab865043bf67 (diff) | |
docs(ci): clarify git-unlock dirty check behavior
Document that the dirtiness check compares content, not timestamps,
and add the `--show-diff` flag example used by CI workflows.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/dev/pages/abouts/ci.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/dev/pages/abouts/ci.md b/docs/dev/pages/abouts/ci.md index 7ffa333..f9a58be 100644 --- a/docs/dev/pages/abouts/ci.md +++ b/docs/dev/pages/abouts/ci.md @@ -112,7 +112,15 @@ Only acts when the HEAD commit message contains `CI TEMP` (case-sensitive); othe - `true` — hard reset past the marker commit, then soft reset + unstage, so **your pre-lock changes are restored into the working tree**. - `false` — a single hard reset back to the original HEAD. -If the working tree is dirty when unlocking (e.g. CI left tracked changes behind, such as stale generated docs), the restore still runs but the command reports a **non-zero exit code** — this is the idempotency check. In CI, that fails the job. +If the working tree is dirty when unlocking (e.g. CI left tracked changes behind, such as stale generated docs), the restore still runs but the command reports a **non-zero exit code** — this is the idempotency check. In CI, that fails the job. The dirtiness check compares **content**, not file timestamps, so merely touching files during a build never fails the check. + +Pass `--show-diff` to print the diff of those tracked changes before they are discarded: + +```bash +cargo ci git-unlock --show-diff +``` + +This is what the CI workflow uses: an idempotency failure shows exactly what contaminated the workspace in the job logs. > **Warning**: when unlocking a `true` lock, changes made *during* CI are discarded. Anything you had before locking comes back. |
