Commit db2ad6fa73adec1ffa364d21d130b69533b30ade

Ryan C. Gordon 2021-03-17T13:36:38

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

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/build-scripts/git-pre-push-hook.pl b/build-scripts/git-pre-push-hook.pl
index f5c5017..ff84dff 100755
--- a/build-scripts/git-pre-push-hook.pl
+++ b/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/" : '';