#758824 git upload-pack: advertise capabilities in repositories with no refs

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Jonathan Nieder
Date:
2014-08-21 19:00:07 UTC
Severity:
wishlist
#758824#5
Date:
2014-08-21 18:56:58 UTC
From:
To:
Empty repositories have no refs and upload-pack therefore does not
advertise capabilities for them:

	$ GIT_TRACE_PACKET=1 git ls-remote file://$(pwd)/foo
	11:54:22.279526 pkt-line.c:46           packet:  upload-pack> 0000
	11:54:22.279744 pkt-line.c:46           packet:          git< 0000
	11:54:22.279875 pkt-line.c:46           packet:          git> 0000
	11:54:22.279918 pkt-line.c:46           packet:  upload-pack< 0000

Meanwhile receive-pack does advertise capabilities, guarded by a
capabilities^{} ref.  And JGit based servers advertise capabilities
even in upload-pack, ever since https://git.eclipse.org/r/15253

	11:54:52.028306 pkt-line.c:46           packet:          git< 0000000000000000000000000000000000000000 capabilities^{}\0 include-tag multi_ack_detailed multi_ack ofs-delta side-band side-band-64k thin-pack no-progress shallow allow-tip-sha1-in-want
	11:54:52.028424 pkt-line.c:46           packet:          git< 0000
	11:54:52.028444 pkt-line.c:46           packet:          git> 0000

Nothing bad seems to have happened from that, so C git should presumably
follow suit (and filter out the fake 'capabilities^{}' ref on the client
side while at it).