diff options
author | William Carroll <wpcarro@gmail.com> | 2022-10-07T18·53-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-07T19·08+0000 |
commit | f3c089ae3e10c22f849e4970e5e3bde0b6ce291f (patch) | |
tree | 5d05aaa559348c8d30457387a3012bee60f53aa4 | |
parent | f5699dec02b484df6cd77104a998b5b6dd59bde6 (diff) |
fix(wpcarro/blog): typos, grammatical errors r/5056
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
-rw-r--r-- | users/wpcarro/website/blog/posts/git-filter-repo-note.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/users/wpcarro/website/blog/posts/git-filter-repo-note.md b/users/wpcarro/website/blog/posts/git-filter-repo-note.md index ac4ac79ec517..e5fbb05f5cd2 100644 --- a/users/wpcarro/website/blog/posts/git-filter-repo-note.md +++ b/users/wpcarro/website/blog/posts/git-filter-repo-note.md @@ -7,19 +7,19 @@ ## Problem -If the `git` garbage-collects any of the commits to which services are pinned, -and that service attempts to deploy/redeploy, it will fail. +If `git` garbage-collects any of the commits to which services are pinned, and +that service attempts to redeploy, the deployment will fail. `git for-each-ref --contains $SHA` will report all of the refs that can reach -some commit, `$SHA`. This may be things like: -- `refs/replace`: `git-filter-repo` artifacts +some commit, `$SHA`. This may report things like: +- `refs/replace` (i.e. `git-filter-repo` artifacts) - `refs/stash` - some local branches - some remote branches -One solution might involve avoid garbage-collection. But if any of our pinned -commits contained sensitive cleartext we will *want* to ensure that `git` purges -these. +One solution might involve creating references to avoid garbage-collection. But +if any of our pinned commits contains sensitive cleartext we *want* to ensure +that `git` purges these. Instead let's find the SHAs of the new, rewritten commits and replace the pinned 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 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 λ git cat-file -p $SHA @@ -43,14 +43,14 @@ feat(florp): Florp can now flarp You're welcome :) ``` -This way is more direct: +This way is more direct (read: code-golf-friendly): ```shell λ git log -1 --format=%T $SHA ``` -Now that we have the SHA of the desired *tree* state, let's query `git` for -commits that share this state. +Now that we have the SHA of the desired tree state, let's use it to query `git` +for commits with the same tree SHA. ```shell λ git log --format='%H %T' | grep $(git log --format=%T -1 $SHA) | awk '{ print $1 }' |