diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-09-27 21:23:51 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-09-27 21:23:51 +0300 |
commit | a4944fb7155fc8aa4d1541d9f1e4e80c00f49292 (patch) | |
tree | 27672a9cf98fcf1b0475d2eeb808ea4a15d92d8d /lib | |
parent | 90578f4ad091f80428a661005060af65a0c7151e (diff) |
Do not regenerate the `lfs_token` every time `git-lfs-authenticate` is called, instead return the saved token if one is present.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/lfs_token.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/lfs_token.rb b/lib/gitlab/lfs_token.rb index d089a2f9b0b..f31444b2b07 100644 --- a/lib/gitlab/lfs_token.rb +++ b/lib/gitlab/lfs_token.rb @@ -18,6 +18,8 @@ module Gitlab end def generate + return value if value + token = Devise.friendly_token(TOKEN_LENGTH) Gitlab::Redis.with do |redis| |