fix(wpcarro/blog): typos, grammatical errors

More notes to me :)

Change-Id: I5264b4234cde67b12610e126ff1d896f6e20457e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6891
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
William Carroll 2022-10-07 11:53:22 -07:00 committed by clbot
parent f5699dec02
commit f3c089ae3e

View file

@ -7,19 +7,19 @@
## Problem ## Problem
If the `git` garbage-collects any of the commits to which services are pinned, If `git` garbage-collects any of the commits to which services are pinned, and
and that service attempts to deploy/redeploy, it will fail. that service attempts to redeploy, the deployment will fail.
`git for-each-ref --contains $SHA` will report all of the refs that can reach `git for-each-ref --contains $SHA` will report all of the refs that can reach
some commit, `$SHA`. This may be things like: some commit, `$SHA`. This may report things like:
- `refs/replace`: `git-filter-repo` artifacts - `refs/replace` (i.e. `git-filter-repo` artifacts)
- `refs/stash` - `refs/stash`
- some local branches - some local branches
- some remote branches - some remote branches
One solution might involve avoid garbage-collection. But if any of our pinned One solution might involve creating references to avoid garbage-collection. But
commits contained sensitive cleartext we will *want* to ensure that `git` purges if any of our pinned commits contains sensitive cleartext we *want* to ensure
these. that `git` purges these.
Instead let's find the SHAs of the new, rewritten commits and replace the pinned Instead let's find the SHAs of the new, rewritten commits and replace the pinned
versions with those. versions with those.
@ -29,7 +29,7 @@ versions with those.
Essentially we want to find a commit with the same *tree* state as the currently Essentially we want to find a commit with the same *tree* state as the currently
pinned commit. Here are two ways to get that info... pinned commit. Here are two ways to get that info...
This way is indirect, but provides more context: This way is indirect, but provides more context about the change:
```shell ```shell
λ git cat-file -p $SHA λ git cat-file -p $SHA
@ -43,14 +43,14 @@ feat(florp): Florp can now flarp
You're welcome :) You're welcome :)
``` ```
This way is more direct: This way is more direct (read: code-golf-friendly):
```shell ```shell
λ git log -1 --format=%T $SHA λ git log -1 --format=%T $SHA
``` ```
Now that we have the SHA of the desired *tree* state, let's query `git` for Now that we have the SHA of the desired tree state, let's use it to query `git`
commits that share this state. for commits with the same tree SHA.
```shell ```shell
λ git log --format='%H %T' | grep $(git log --format=%T -1 $SHA) | awk '{ print $1 }' λ git log --format='%H %T' | grep $(git log --format=%T -1 $SHA) | awk '{ print $1 }'