diff --git a/docs/WORKSPACE.md b/docs/WORKSPACE.md index 1230c7480..1da250d10 100644 --- a/docs/WORKSPACE.md +++ b/docs/WORKSPACE.md @@ -140,12 +140,14 @@ Where `--unshallow` is refused, deepen in steps with `git rev-parse --is-shallow-repository` prints `false`, a "yes" from `--is-ancestor` is reliable but a "no" is not. -The commit is in `main` exactly when that merge base equals `` (status -`ahead` or `identical`). A 404 alone proves nothing: GitHub also answers 404 for -a mistyped SHA, a missing branch or a repository the caller cannot see. Treat an -unexplained 404 as inconclusive. To establish unrelated history, use a complete -clone in which both commits resolve (`git cat-file -e ^{commit}`) and -`git merge-base origin/main` prints nothing. +The commit is in `main` exactly when that merge base equals the full +40-character SHA of the commit (status `ahead` or `identical`). The API always +returns the full SHA, so compare it with `git rev-parse `: an abbreviated +`` never matches and would read as a false "not in `main`". A 404 alone +proves nothing: GitHub also answers 404 for a mistyped SHA, a missing branch or +a repository the caller cannot see. Treat an unexplained 404 as inconclusive. To +establish unrelated history, use a complete clone in which both commits resolve +(`git cat-file -e ^{commit}`) and `git merge-base origin/main` prints nothing. Ancestry shows only that a commit landed. Work carried onto `main` in a new commit, such as a refresh, has a new SHA, so compare its blobs instead: