Context
While it's certainly possible (and even encouraged, as DIDs become more wide-spread) to use an external DID as one's contributor DID (e.g. did:sov, did:btcr, etc.) it also seems useful and likely common to create a DID within the git repository for a contributor. It could be that the contributor has no other DID, or they prefer to remain anonymous, and thus need a new DID.
Proposal
We could require that all new DIDs generated via the did:git method be by appending the commit sha.
So for the genesis DID of the repo itself, the DID would be generated from did:git:$commit. (Producing did:git:<genesis commit SHA>.)
For a subsequent new contributor DID to be generated, it would be did:git:<genesis commit SHA>:$commit where this $commit refers not to the genesis commit, but to the SHA1 of the commit where the contributor's new DID document was added.
Corollaries
This would imply that DID document filenames stored like did/<contributor>.did do not contain the actual DID in the filename (nor in the document). Since the SHA1 is generated as a result of checking in the DID Document, a contributor DID doc would suffer from the same problem as the genesis DID document--the DID itself is known only after creation.
So, the <contributor> in <contributor>.did could be the name or handle of the contributor, rather than their DID. As an aside, I think this would actually be easier to manage, since listing the directory contents would show recognizable names rather than a list of SHA-like DIDs.
Also, contributor DID generation would be exactly like repository DID generation: the DID is contained in the context of the DID Document creation (i.e. in the SHA1) not in the repository content.
Lastly, only one new contributor DID can be generated per commit.
Context
While it's certainly possible (and even encouraged, as DIDs become more wide-spread) to use an external DID as one's contributor DID (e.g.
did:sov,did:btcr, etc.) it also seems useful and likely common to create a DID within the git repository for a contributor. It could be that the contributor has no other DID, or they prefer to remain anonymous, and thus need a new DID.Proposal
We could require that all new DIDs generated via the
did:gitmethod be by appending the commit sha.So for the genesis DID of the repo itself, the DID would be generated from
did:git:$commit. (Producingdid:git:<genesis commit SHA>.)For a subsequent new contributor DID to be generated, it would be
did:git:<genesis commit SHA>:$commitwhere this$commitrefers not to the genesis commit, but to the SHA1 of the commit where the contributor's new DID document was added.Corollaries
This would imply that DID document filenames stored like
did/<contributor>.diddo not contain the actual DID in the filename (nor in the document). Since the SHA1 is generated as a result of checking in the DID Document, a contributor DID doc would suffer from the same problem as the genesis DID document--the DID itself is known only after creation.So, the
<contributor>in<contributor>.didcould be the name or handle of the contributor, rather than their DID. As an aside, I think this would actually be easier to manage, since listing the directory contents would show recognizable names rather than a list of SHA-like DIDs.Also, contributor DID generation would be exactly like repository DID generation: the DID is contained in the context of the DID Document creation (i.e. in the SHA1) not in the repository content.
Lastly, only one new contributor DID can be generated per commit.