-
Notifications
You must be signed in to change notification settings - Fork 0
Home
rindeal edited this page Sep 8, 2024
·
11 revisions
Welcome to the git-remote-refs-cmp wiki!
examples of unusual ls-remote reponses:
2d563a054497c2adade24c42b3c8188035b8393e HEAD symref-target:refs/heads/master
2d563a054497c2adade24c42b3c8188035b8393e refs/heads/foo symref-target:refs/heads/bar peeled:2d563a054497c2adade24c42b3c8188035b8393e
unborn refs/heads/name
git
debugging/tracing
export GIT_TRACE=1
export GIT_TRACE_PACK_ACCESS=1
export GIT_TRACE_PACKET=1
export GIT_TRACE_PERFORMANCE=1
export GIT_TRACE_SETUP=1
simulate .../info/refs?service=git-upload-pack
GET request response
git upload-pack --http-backend-info-refs '/SOME/GIT/REPO' 2>/dev/null
#!/bin/bash
export GIT_TRACE=1
export GIT_TRACE_PACK_ACCESS=1
export GIT_TRACE_PACKET=1
export GIT_TRACE_PERFORMANCE=1
export GIT_TRACE_SETUP=1
export HTTP_GIT_PROTOCOL="version=2" # `Git-Protocol:` header
export GIT_PROJECT_ROOT='/tmp/foo-git'
export GIT_HTTP_EXPORT_ALL=1
export REQUEST_METHOD='GET'
export QUERY_STRING="service=git-upload-pack"
export PATH_INFO="/info/refs"
export CONTENT_TYPE="application/x-git-upload-pack-request"
# Simulate the HTTP request
/usr/libexec/git-core/git-http-backend
Expires: Fri, 01 Jan 1980 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate
Content-Type: application/x-git-upload-pack-advertisement
000eversion 2
0015agent=git/2.46.0
0013ls-refs=unborn
0020fetch=shallow wait-for-done
0012server-option
0017object-format=sha1
0000%