Browse Source

git-pre-push-hook: remove ".git" from URL.

Ryan C. Gordon 4 năm trước cách đây
mục cha
commit
db2ad6fa73
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      build-scripts/git-pre-push-hook.pl

+ 1 - 0
build-scripts/git-pre-push-hook.pl

@@ -27,6 +27,7 @@ my $url = $ARGV[1];
 #print("remote: $remote\n");
 #print("url: $url\n");
 
+$url =~ s/\.git$//;  # change myorg/myproject.git to myorg/myproject
 $url =~ s#^git\@github\.com\:#https://github.com/#i;
 my $commiturl = $url =~ /\Ahttps?:\/\/github.com\// ? "$url/commit/" : '';