Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/WORKSPACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<sha>` (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 <sha>^{commit}`) and
`git merge-base <sha> 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 <sha>`: an abbreviated
`<sha>` 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 <sha>^{commit}`) and `git merge-base <sha> 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:
Expand Down
Loading