diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-05-27 10:56:17 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-05-27 10:56:17 +0100 |
commit | 784ebcfb4d749b4d0cf36b3b3bf3bc839a013ee0 (patch) | |
tree | 27efb763535c3ec2fa51cf46e1dbcf1540ad8f24 | |
parent | 4193ec5ef29d6375191df5683d6eb2b18f18e720 (diff) | |
download | gitano-784ebcfb4d749b4d0cf36b3b3bf3bc839a013ee0.tar.gz |
REPOSITORY: Allow tokens to be customised with notes
Given we now use repository tokens in multiple places, this ensures that the
tokens can be customised with notes. This might be to ensure that a delete
user token doesn't match a rename user token for example.
-rw-r--r-- | lib/gitano/repository.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitano/repository.lua b/lib/gitano/repository.lua index f512092..39ed21b 100644 --- a/lib/gitano/repository.lua +++ b/lib/gitano/repository.lua @@ -443,7 +443,7 @@ function repo_method:set_head(newhead) return true end -function repo_method:generate_confirmation() +function repo_method:generate_confirmation(notes) -- Generate a confirmation token. -- To do this, we read *ALL* refs in the repository and their -- sha1 sums. We then hash all that to generate a token @@ -454,7 +454,7 @@ function repo_method:generate_confirmation() refnames[#refnames+1] = ref end table.sort(refnames) - local str = "" + local str = notes or "" log.debug("Calculating confirmation token for", self.name) for i = 1, #refnames do local ref, sha = refnames[i], refs[refnames[i]] |