I've been contemplating a URI scheme for referencing objects in Git repositories.


I would want this scheme to be able to:

It would be nice if it could also:


References the object file with hash 'asdf1234', including the header.
References the object encoded by the file with hash 'asdf1234'. If the object is a blob, this URN would resolve to the blob itself (a sequence of bytes). If the referenced object is not a blob, then it is not directly representable as a byte stream, and a strict resolver would return an error if it is asked to represent it as a byte stream.
References the object identified by 'asdf1234' and provides a repository from which to fetch it. More than one 'repository' parameter could be specified.
Assuming asdf1234 identifies a commit or tree object, #path/to/file would find the object called 'path/to/file' referenced by that commit.
References the latest commit on branch 'master' in any of the listed repositories.
References the latest commit on branch 'master' signed using the specified public key. Not sure what format the public key would be in. Possibly that output by 'gpg --export' (which you could fingerprint using 'gpg --with-fingerprint <file>')
a clearer alternative scheme to x-git-object when the named object is a commit. Maybe x-git-tree and x-git-blob, too.


x-git-commit:0d187173d04e67fef5e9178ee761786df04905f0?repository=https://github.com/TOGoS/TFMPM.git references this commit and hints to look for it in that GitHub repository.