Add User Agent to Git Remote Helper · Entire

Ensure that the git remote helper sets an user agent so that it can be identified from the server side.

1mo ago·8m·48 calls

Lint clean. Now run the test suite.

commit changes

1mo ago·47.0s·4 calls

All touched packages pass. Here's the draft commit (5 files):

Files:

Draft commit message:

git-remote-entire: stamp HTTP User-Agent on outbound requests

The helper already advertises itself via the git protocol pkt-line agent=
capability (commit-stamped), but every HTTP request it makes — info/refs,
upload-pack/receive-pack POSTs, well-known discovery, STS exchanges,
refresh-token rotations — went out with Go's default "Go-http-client/1.1",
making the helper invisible in upstream access logs and indistinguishable
from any other Go client hitting the data plane.

Add httpclient.UserAgentTransport, a small RoundTripper wrapper that
stamps User-Agent on each outbound request, and wire it into both the
auth-side *http.Client and the transport.Proxy so every credentialled hop
from the helper carries "git-remote-entire/<version>". The wrapper sits
outside the httpdebug RoundTripper so the debug log captures the same
headers the wire sees. UserAgent on transport.Config is optional — empty
falls back to Go's default, which keeps the existing tests that don't
care about identity working unchanged.

Format is version-stamped (binary/version) to match the conventional form
the rest of the entire HTTP clients use; the git protocol agent stays
commit-stamped where it is, since the two serve different correlation
needs and changing it risks breaking server-side log analysis.

With trailers:

Assisted-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Paulo Gomes <paulo@entire.io>

Want me to proceed with the commit?

yep

1mo ago·28.3s·2 calls

Committed as 5422e2057 on useragent.

Use the same version for both:

githelper.Agent = remotehelper.BinaryName + "/" + versioninfo.Commit httpUserAgent := remotehelper.BinaryName + "/" + versioninfo.Version

Draft commit message:

git-remote-entire: unify git protocol agent and HTTP User-Agent

The previous commit stamped the HTTP User-Agent with versioninfo.Version
while the git protocol agent kept its prior versioninfo.Commit format,
leaving two different identifiers for the same binary. Use the
version-stamped form for both — server-side log analysis can correlate
git protocol agent and HTTP access-log entries without translation, and
the conventional binary/version shape matches what the rest of the
entire HTTP clients advertise.

With the standard trailers. Want me to commit?

yep

1mo ago·42.7s·3 calls

Committed as 890ee7899. Both commits now on useragent branch:

[c9ad967git-remote-entire: stamp HTTP User-Agent on outbound requests

The helper already advertises itself via the git protocol pkt-line agent=
capability (commit-stamped), but every HTTP request it makes — info/refs,
upload-pack/receive-pack POSTs, well-known discovery, STS exchanges,
refresh-token rotations — went out with Go's default "Go-http-client/1.1",
making the helper invisible in upstream access logs and indistinguishable
from any other Go client hitting the data plane.

Add httpclient.UserAgentTransport, a small RoundTripper wrapper that
stamps User-Agent on each outbound request, and wire it into both the
auth-side *http.Client and the transport.Proxy so every credentialled hop
from the helper carries "git-remote-entire/". The wrapper sits
outside the httpdebug RoundTripper so the debug log captures the same
headers the wire sees. UserAgent on transport.Config is optional — empty
falls back to Go's default, which keeps the existing tests that don't
care about identity working unchanged.

Format is version-stamped (binary/version) to match the conventional form
the rest of the entire HTTP clients use; the git protocol agent stays
commit-stamped where it is, since the two serve different correlation
needs and changing it risks breaking server-side log analysis.

Assisted-by: Claude Opus 4.7 noreply@anthropic.com
Signed-off-by: Paulo Gomes paulo@entire.io
Entire-Checkpoint: 77b0105f5529+221/-5](/content/gh/entireio/cli/commit/c9ad967481fbd2f9fc679d56c2588a0947774462/index.html)

[6684735git-remote-entire: unify git protocol agent and HTTP User-Agent

The previous commit stamped the HTTP User-Agent with versioninfo.Version
while the git protocol agent kept its prior versioninfo.Commit format,
leaving two different identifiers for the same binary. Use the
version-stamped form for both — server-side log analysis can correlate
git protocol agent and HTTP access-log entries without translation, and
the conventional binary/version shape matches what the rest of the
entire HTTP clients advertise.

Assisted-by: Claude Opus 4.7 noreply@anthropic.com
Signed-off-by: Paulo Gomes paulo@entire.io
Entire-Checkpoint: 730d0e755ea2+10/-9](/content/gh/entireio/cli/commit/6684735bbb3751ca696d70f8c78efd6d10f2b47a/index.html)