diffrefs

command
v0.183.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command diffrefs reads the issue and pull-request references a DIFF ADDS, and refuses one that does not exist yet.

git diff --cached | diffrefs --repo owner/name -
diffrefs --repo owner/name <patch>

⛔ IT EXISTS BECAUSE EVERY OTHER CHECK HERE READS A PUBLISHED BODY. `prbody` reads a pull request's body, and the controls written into the lesson never-guess-a-pr-number read a body and its comments. None of them reads COMMITTED PROSE — a README, a doc comment, a test comment, a commit message — and that is where the mistake recurred on 2026-11-17 (go-pdfkit/reader): "#68" was written into about fifteen places, all deduced from "the last one was #67", before the pull request existed. `gh pr create` then returned #68 and the reference was RIGHT.

⛔⛔ THAT IS THE DANGEROUS FORM, NOT THE BENIGN ONE. Nothing could catch it: the number was correct, so a human reading the diff saw nothing, and the error is visible only in the ORDER of operations — prose committed before the artifact it cites exists. The earlier advice, "capture the number `gh pr create` returned", cannot apply here by construction: the prose is committed BEFORE the push, so before the pull request exists at all.

So the question this asks is not "is this number plausible" but "does it exist RIGHT NOW, before the commit lands". A reference to something that does not exist yet is a bet, whether or not it comes in.

⚠ AND IT IS HONEST ABOUT WHAT IT CANNOT DO. A guessed number almost always lands on something that DOES exist — the recorded cases hit a Renovate pull request, a peer's pull request, an issue long closed — so existence alone never proves a reference right. Every resolved reference is printed WITH ITS TITLE, for a person to compare against what the sentence claims to cite. That half is a report. The refusal is the gate.

⛔⛔ AND IT CANNOT BE RUN AFTER THE FACT. This check has power at exactly one moment: before the commit lands, while the reference still does not resolve. Run over the same diff a day later it comes back GREEN, because by then the pull request exists — which is what the author of the recorded occurrence measured on their own diff the morning after: 1127 added lines, four references, all resolving, titles printed, and nothing reproduced. That run proves the plumbing and says nothing about the catch; only the test fixture, which holds an API that does not have the number yet, proves the catch. A green answer from this command is therefore a statement about NOW, never about the commit's own past.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL