Commit 54baf7c6be0a43ecaacd47ee9efea445ee10abf8
- Date: Wed Apr 30 00:29:14 +0000 2008
- Committer: Tim Dysinger (tim@dysinger.net)
- Author: Tim Dysinger (tim@dysinger.net)
- Commit SHA1: 54baf7c6be0a43ecaacd47ee9efea445ee10abf8
- Tree SHA1: f8bf9e146a71d905e1df776fcf0b9d7d0303f1f0
Changed gitorious so ssh read only works - needed for private projects
Commit diff
| |   |
| 47 | 47 | |
| 48 | 48 | # The meat of it all; do the permission check |
| 49 | 49 | # replace process with git-shell if everything is fine |
| 50 | | if client.assure_user_can_write! |
| 51 | | args = client.to_git_shell_argument |
| 52 | | $stderr.puts "git-shell -c #{args.inspect}" if $DEBUG |
| 53 | | exec("git-shell", "-c", args) |
| 54 | | end |
| 50 | args = client.to_git_shell_argument |
| 51 | args.include?('git-receive-pack') && client.assure_user_can_write! |
| 52 | $stderr.puts "git-shell -c #{args.inspect}" if $DEBUG |
| 53 | exec("git-shell", "-c", args) |
| 55 | 54 | |
| 56 | 55 | unless $?.success? |
| 57 | 56 | $stderr.puts "Failed to execute git command" |
| toggle raw diff |
--- a/script/gitorious
+++ b/script/gitorious
@@ -47,11 +47,10 @@ begin
# The meat of it all; do the permission check
# replace process with git-shell if everything is fine
- if client.assure_user_can_write!
- args = client.to_git_shell_argument
- $stderr.puts "git-shell -c #{args.inspect}" if $DEBUG
- exec("git-shell", "-c", args)
- end
+ args = client.to_git_shell_argument
+ args.include?('git-receive-pack') && client.assure_user_can_write!
+ $stderr.puts "git-shell -c #{args.inspect}" if $DEBUG
+ exec("git-shell", "-c", args)
unless $?.success?
$stderr.puts "Failed to execute git command" |