fix bug that create_repository don't work in rental...
...server
... | ... |
@@ -406,8 +406,9 @@ sub _create_rep { |
406 | 406 |
# Git init |
407 | 407 |
{ |
408 | 408 |
my @git_init_cmd = $git->cmd_rep($rep, 'init', '--bare'); |
409 |
- system(@git_init_cmd) == 0 |
|
410 |
- or croak "Can't execute git init --bare:@git_init_cmd"; |
|
409 |
+ open my $fh, "-|", @git_init_cmd |
|
410 |
+ or croak "Can't open git init --bare:@git_init_cmd"; |
|
411 |
+ close $fh or croak "Can't execute git init --bare:@git_init_cmd"; |
|
411 | 412 |
} |
412 | 413 |
|
413 | 414 |
# Add git-daemon-export-ok |
... | ... |
@@ -423,8 +424,9 @@ sub _create_rep { |
423 | 424 |
'--bare', |
424 | 425 |
'update-server-info' |
425 | 426 |
); |
426 |
- system(@git_update_server_info_cmd) == 0 |
|
427 |
- or croak "Can't execute git --bare update-server-info"; |
|
427 |
+ open my $update_server_info_fh, "-|", @git_update_server_info_cmd |
|
428 |
+ or croak "Can't open git --bare update-server-info"; |
|
429 |
+ close $update_server_info_fh or croak "Can't execute git --bare update-server-info"; |
|
428 | 430 |
move("$rep/hooks/post-update.sample", "$rep/hooks/post-update") |
429 | 431 |
or croak "Can't move post-update"; |
430 | 432 |
|
... | ... |
@@ -450,8 +452,9 @@ sub _create_rep { |
450 | 452 |
|
451 | 453 |
# Git init |
452 | 454 |
my @git_init_cmd = $git->cmd_rep($temp_work, 'init', '-q'); |
453 |
- system(@git_init_cmd) == 0 |
|
454 |
- or croak "Can't execute git init"; |
|
455 |
+ open my $init_fh, "-|", @git_init_cmd |
|
456 |
+ or croak "Can't open git init"; |
|
457 |
+ close $init_fh or croak "Can't execute git init"; |
|
455 | 458 |
|
456 | 459 |
# Add README |
457 | 460 |
my $file = "$temp_work/README"; |
... | ... |
@@ -463,8 +466,9 @@ sub _create_rep { |
463 | 466 |
'add', |
464 | 467 |
'README' |
465 | 468 |
); |
466 |
- system(@git_add_cmd) == 0 |
|
467 |
- or croak "Can't execute git add"; |
|
469 |
+ open my $add_fh, "-|", @git_add_cmd |
|
470 |
+ or croak "Can't open git add"; |
|
471 |
+ close $add_fh or croak "Can't execute git add"; |
|
468 | 472 |
|
469 | 473 |
# Commit |
470 | 474 |
my $author = "$user <$user\@localhost>"; |
... | ... |
@@ -477,8 +481,9 @@ sub _create_rep { |
477 | 481 |
'-m', |
478 | 482 |
'first commit' |
479 | 483 |
); |
480 |
- system(@git_commit_cmd) == 0 |
|
481 |
- or croak "Can't execute git commit"; |
|
484 |
+ open my $commit_fh, "-|", @git_commit_cmd |
|
485 |
+ or croak "Can't open git commit"; |
|
486 |
+ close $commit_fh or croak "Can't execute git commit"; |
|
482 | 487 |
|
483 | 488 |
# Push |
484 | 489 |
{ |
... | ... |
@@ -492,8 +497,9 @@ sub _create_rep { |
492 | 497 |
); |
493 | 498 |
# (This is bad, but --quiet option can't supress in old git) |
494 | 499 |
my $git_push_cmd = join(' ', @git_push_cmd); |
495 |
- system("$git_push_cmd 2> /dev/null") == 0 |
|
496 |
- or croak "Can't execute git push"; |
|
500 |
+ open my $commit_fh, "-|", "$git_push_cmd 2> /dev/null" |
|
501 |
+ or croak "Can't open git push"; |
|
502 |
+ close $commit_fh or croak "Can't execute git push"; |
|
497 | 503 |
} |
498 | 504 |
} |
499 | 505 |
}; |
... | ... |
@@ -79,6 +79,13 @@ |
79 | 79 |
%= include '/include/header'; |
80 | 80 |
|
81 | 81 |
<div class="container"> |
82 |
+ <ul class="breadcrumb" style="margin-top:10px"> |
|
83 |
+ <li><a href="<%= url_for('/') %>"><i class="icon-home"></i></a></li> |
|
84 |
+ / |
|
85 |
+ % my $user = session('user'); |
|
86 |
+ <li><a href="<%= url_for("/$user") %>"><%= $user %></a></li> |
|
87 |
+ </ul> |
|
88 |
+ |
|
82 | 89 |
% if ($errors) { |
83 | 90 |
<div class="alert alert-error"> |
84 | 91 |
<button type="button" class="close" data-dismiss="alert">×</button> |