What upstream has that we don't
Explore this workspace.
Technical background
Settings → Upstream compares this checkout against the project the fork tracks: how many commits have landed there that are not here, the patch series carried on top, and where each commit is on the web. It never fetches on its own, so how stale the answer is has to be visible, and it is.
The problem
"Should I sync?" is a question about a repository, asked from inside an application, and answering it meant leaving the window for a shell.
How it works
Settings → Upstream compares this checkout against the project the fork tracks: how many commits have landed there that are not here, the patch series carried on top, and where each commit is on the web.
Settings
upstream.repositoryPath:''Point at a checkout explicitly. Empty walks up from the executable.
upstream.remote:'upstream'Which remote is the project being tracked.
upstream.branch:'master'Which branch of it.
Details
- It never fetches on its own. Network I/O when a settings page opens is how a page earns a reputation for being slow — fetching is a button. Which makes the staleness the thing that has to be visible: the last-fetch time is shown, warned about past a week, and the page says outright that it is reporting what was last fetched rather than what upstream has now. "0 behind" from a month-old fetch looks identical to a fresh one otherwise.
FETCH_HEAD's mtime is when the fetch happened; the ref's own mtime is when it last moved, which is a different question and usually much older.- Fields are split on
%x1f/%x1erather than a delimiter that could appear in a commit message. - A missing
upstreamremote is the ordinary case for a fresh clone, so it is a message with the command to fix it, not an error. - Verified against
git rev-liston this checkout: behind and ahead counts, branch, the newest local subject and the resolved GitHub URL all match, and the Fetch button movesFETCH_HEADin about 1.5s.
What this does not claim
- Only a source build has a checkout to find. A packaged build genuinely has none — the build sidecar records the commit but not where it was built — so that case is reported plainly, with a setting to point at a checkout anyway, rather than guessed at.