From d5a71e9ca3d95330acdd858306c4f75ae0b01e58 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Mon, 29 Jun 2015 18:05:11 -0700 Subject: Store push certificates in refs/meta/push-certs Inspired by a proposal from gitolite[1], where we store a file in a tree for each ref name, and the contents of the file is the latest push cert to affect that ref. The main modification from that proposal (other than lacking the out-of-git batching) is to append "@{cert}" to filenames, which allows storing certificates for both refs/foo and refs/foo/bar. Those refnames cannot coexist at the same time in a repository, but we do not want to discard the push certificate responsible for deleting the ref, which we would have to do if refs/foo in the push cert tree changed from a tree to a blob. The "@{cert}" syntax is at least somewhat consistent with gitrevisions(7) wherein @{...} describe operators on ref names. As we cannot (currently) atomically update the push cert ref with the refs that were updated, this operation is inherently racy. Kick the can down the road by pushing this burden on callers. [1] https://github.com/sitaramc/gitolite/blob/cf062b8bb6b21a52f7c5002d33fbc950762c1aa7/contrib/hooks/repo-specific/save-push-signatures Change-Id: Id3eb32416f969fba4b5e4d9c4b47053c564b0ccd --- .../resources/org/eclipse/jgit/internal/JGitText.properties | 3 +++ 1 file changed, 3 insertions(+) (limited to 'org.eclipse.jgit/resources/org/eclipse') diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index bc8b8bfc05..0e0b4028b0 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -564,6 +564,9 @@ stashDropMissingReflog=Stash reflog does not contain entry ''{0}'' stashFailed=Stashing local changes did not successfully complete stashResolveFailed=Reference ''{0}'' does not resolve to stashed commit statelessRPCRequiresOptionToBeEnabled=stateless RPC requires {0} to be enabled +storePushCertMultipleRefs=Store push certificate for {0} refs +storePushCertOneRef=Store push certificate for {0} +storePushCertReflog=Store push certificate submoduleExists=Submodule ''{0}'' already exists in the index submoduleParentRemoteUrlInvalid=Cannot remove segment from remote url ''{0}'' submodulesNotSupported=Submodules are not supported -- cgit v1.2.3