Control: retitle -1 uscan: tracking HEAD gives incorrect result if upstreamvcs 
remote is present

On Sat, 15 Nov 2025 at 23:16:28 +1100, Hugh McMaster wrote:
I see you are using the new git upstream repository mode introduced in 2.25.23. This mode operates on cloned repositories and only fetches new commits.

If I'm understanding correctly, there is no way to disable use of this new mode while running in a git working directory?

On 12/11/2025 5:51 am, Xiyue Deng wrote:
On closer inspect, `ca232ba' is actually the latest commit of my
debian/latest branch on Salsa.  So it looks like when tracking HEAD,
uscan is using my `debian/latest' branch instead of the remote branch
for getting the latest commit time and hash.

Interesting. Can you please post (or link to) the output of `git remote --verbose show` and `uscan -vv`?

Here is a reproducer in a predictable environment (with ioquake3, but it would probably work with any source package that has Repository in its debian/upstream/metadata and uses Matching-Pattern: HEAD).

Preconditions:

$ podman run --rm -it docker.io/debian:sid-slim
# apt update
# apt upgrade
# apt install devscripts git-buildpackage pbuilder- sbuild- schroot-
# mkdir /src
# cd /src

(Or use your favourite container/VM/chroot technology to get a clean sid environment with no personal configuration present.)

Good scenario (not using the new code path):

# gbp clone --no-add-upstream-vcs 
https://salsa.debian.org/games-team/ioquake3.git no-upstream-remote
# env --chdir=no-upstream-remote uscan -ddv
...
Newest version of ioquake3 on remote site is 1.36+u20251111.fcde284, local 
version is 1.36+u20251029.a553ad1+dfsg
...
# env --chdir=no-upstream-remote git remote -v show
origin  https://salsa.debian.org/games-team/ioquake3.git (fetch)
origin  https://salsa.debian.org/games-team/ioquake3.git (push)

Non-working scenario (using the new code path, showing this bug):

# gbp clone --add-upstream-vcs https://salsa.debian.org/games-team/ioquake3.git 
has-upstream-remote
# env --chdir=has-upstream-remote uscan -ddv
...
Newest version of ioquake3 on remote site is 1.36+u20251029.ef39fab1, local 
version is 1.36+u20251029.a553ad1+dfsg
...
# env --chdir=has-upstream-remote git remote -v show
origin  https://salsa.debian.org/games-team/ioquake3.git (fetch)
origin  https://salsa.debian.org/games-team/ioquake3.git (push)
upstreamvcs     https://github.com/ioquake/ioq3.git (fetch)
upstreamvcs     https://github.com/ioquake/ioq3.git (push)

ef39fab1 is not an upstream version - instead, it is the latest commit on my local HEAD. I think uscan is using that, instead of what it should be doing in this situation, which is to ask the upstreamvcs remote what its HEAD is.

    smcv

Reply via email to