Commit 89b97c3cf9d396d8782d976f9c2306675e777f36
- Date: Sat Apr 19 00:59:03 +0000 2008
- Committer: Tim Dysinger (tim@dysinger.net)
- Author: Tim Dysinger (tim@dysinger.net)
- Commit SHA1: 89b97c3cf9d396d8782d976f9c2306675e777f36
- Tree SHA1: 3d9d7fde19e9345febb58db145a0b85a36051e74
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" |