chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
520d2b0
)
Infra: dgit-ssh-dispatch: Break out serve_up (nfc)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 20 Jun 2015 15:08:46 +0000
(16:08 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 20 Jun 2015 15:08:46 +0000
(16:08 +0100)
infra/dgit-ssh-dispatch
patch
|
blob
|
history
diff --git
a/infra/dgit-ssh-dispatch
b/infra/dgit-ssh-dispatch
index f29515f53e073c8b19e7345f950a278dad58e896..e90687cb65d292f95e6279d444b397b0c2e6a8fb 100755
(executable)
--- a/
infra/dgit-ssh-dispatch
+++ b/
infra/dgit-ssh-dispatch
@@
-111,6
+111,12
@@
sub hasrepo () {
}
}
+sub serve_up ($) {
+ my ($repo) = @_;
+ exec qw(git upload-pack --strict --timeout=1000), $repo;
+ die "exec git: $!";
+}
+
sub dispatch () {
local ($_) = $ENV{'SSH_ORIGINAL_COMMAND'};
@@
-129,8
+135,7
@@
sub dispatch () {
die "exec $s: $!";
} elsif ($cmd eq 'upload-pack') {
$repo='$repos/_empty' unless hasrepo;
- exec qw(git upload-pack --strict --timeout=1000), $repo;
- die "exec git: $!";
+ serve_up $repo;
} else {
die "unsupported git operation $cmd ($_)";
}