Alexandre Julliard : git-notify: Put the repository name in the path portion of the URL.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Oct 4 04:24:01 CDT 2006


Module: tools
Branch: master
Commit: eb86f80e1cc6e8bcf9192fe88656d7eb43d74a53
URL:    http://source.winehq.org/git/?p=tools.git;a=commit;h=eb86f80e1cc6e8bcf9192fe88656d7eb43d74a53

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Oct  4 11:23:00 2006 +0200

git-notify: Put the repository name in the path portion of the URL.

---

 git-notify |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/git-notify b/git-notify
index 228d7a4..a2bf65d 100755
--- a/git-notify
+++ b/git-notify
@@ -218,7 +218,7 @@ sub send_commit_notice($$)
         "Module: $repos_name",
         "Branch: $ref",
         "Tag:    $obj",
-        "URL:    $gitweb_url/?p=$repos_name.git;a=tag;h=$obj",
+        "URL:    $gitweb_url/?a=tag;h=$obj",
         "",
         "Tagger: " . $info{"tagger"},
         "Date:   " . format_date($info{"tagger_date"},$info{"tagger_tz"}),
@@ -232,7 +232,7 @@ sub send_commit_notice($$)
         "Module: $repos_name",
         "Branch: $ref",
         "Commit: $obj",
-        "URL:    $gitweb_url/?p=$repos_name.git;a=commit;h=$obj",
+        "URL:    $gitweb_url/?a=commit;h=$obj",
         "",
         "Author: " . $info{"author"},
         "Date:   " . format_date($info{"author_date"},$info{"author_tz"}),
@@ -256,7 +256,7 @@ sub send_commit_notice($$)
         }
         else
         {
-            push @notice, "Diff:   $gitweb_url/?p=$repos_name.git;a=commitdiff;h=$obj",
+            push @notice, "Diff:   $gitweb_url/?a=commitdiff;h=$obj",
         }
 
         $subject = $info{"author_name"} . ": " . ${$info{"log"}}[0];
@@ -312,7 +312,7 @@ sub send_cia_notice($$)
 
     push @cia_text,
         "      </files>",
-        "      <url>" . xml_escape("$gitweb_url/?p=$repos_name.git;a=commit;h=$commit") . "</url>",
+        "      <url>" . xml_escape("$gitweb_url/?a=commit;h=$commit") . "</url>",
         "    </commit>",
         "  </body>",
         "  <timestamp>" . $info{"author_date"} . "</timestamp>",
@@ -331,7 +331,7 @@ sub send_global_notice($$$)
     while (<LIST>)
     {
         chomp;
-        s/^commit /URL:    $gitweb_url\/?p=$repos_name.git;a=commit;h=/;
+        s/^commit /URL:    $gitweb_url\/?a=commit;h=/;
         push @notice, $_;
     }
     close LIST;
@@ -342,6 +342,9 @@ sub send_global_notice($$$)
 $repos_name = get_repos_name();
 parse_options();
 
+# append repository path to URL
+$gitweb_url .= "/$repos_name.git";
+
 my $ref = $ARGV[0];
 $ref =~ s/^refs\/heads\///;
 




More information about the wine-cvs mailing list