{"thread":{"id":"4850","subject":"[PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible","startedAt":"2006-07-11T10:19:33Z","lastAt":"2006-07-12T00:01:03Z","messageCount":17,"participants":["Alp Toker","Andreas Ericsson","Martin Langhoff","Johannes Schindelin","Petr Baudis","Junio C Hamano","Pavel Roskin","Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23631","messageId":"11526131782190-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":null,"subject":"[PATCH] Typo fix","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:33Z","receivedAt":"2006-07-11T10:19:33Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"Signed-off-by: Alp Toker <alp@atoker.com>\n---\n Documentation/git-name-rev.txt |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\nindex 43f8c25..37fbf66 100644\n--- a/Documentation/git-name-rev.txt\n+++ b/Documentation/git-name-rev.txt\n@@ -33,7 +33,7 @@ EXAMPLE\n -------\n \n Given a commit, find out where it is relative to the local refs. Say somebody\n-wrote you about that phantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.\n+wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.\n Of course, you look into the commit, but that only tells you what happened, but\n not the context.\n \n-- \n1.4.1.g97c7-dirty\n"},{"id":"23629","messageId":"11526131781900-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":"11526131782190-git-send-email-alp@atoker.com","subject":"[PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:34Z","receivedAt":"2006-07-11T10:19:34Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"\"The 'text/html' media type [RFC2854] is primarily for HTML, not for\nXHTML. In general, this media type is NOT suitable for XHTML.\"\n\nThis patch makes gitweb use content negotiation to conservatively send\npages as Content-Type 'application/xhtml+xml' when the user agent\nexplicitly claims to support it.\n\nIt falls back to 'text/html' even if the user agent appears to\nimplicitly support 'application/xhtml+xml' due to a '*/*' glob, working\naround an insidious bug in Internet Explorer where sending the correct\nmedia type prevents the page from being displayed.\n\nSigned-off-by: Alp Toker <alp@atoker.com>\n---\n gitweb/gitweb.cgi |   14 ++++++++++++--\n 1 files changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex 2e87de4..bd9b9de 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -293,7 +293,17 @@ sub git_header_html {\n \t\t\t}\n \t\t}\n \t}\n-\tprint $cgi->header(-type=>'text/html',  -charset => 'utf-8', -status=> $status, -expires => $expires);\n+\tmy $content_type;\n+\t# require explicit support from the UA if we are to send the page as\n+\t# 'application/xhtml+xml', otherwise send it as plain old 'text/html'.\n+\t# we have to do this because MSIE sometimes globs '*/*', pretending to\n+\t# support xhtml+xml but choking when it gets what it asked for.\n+\tif ($cgi->http('HTTP_ACCEPT') =~ m/(,|;|\\s|^)application\\/xhtml\\+xml(,|;|\\s|$)/ && $cgi->Accept('application/xhtml+xml') != 0) {\n+\t\t$content_type = 'application/xhtml+xml';\n+\t} else {\n+\t\t$content_type = 'text/html';\n+\t}\n+\tprint $cgi->header(-type=>$content_type,  -charset => 'utf-8', -status=> $status, -expires => $expires);\n \tprint <<EOF;\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n@@ -301,7 +311,7 @@ sub git_header_html {\n <!-- git web interface v$version, (C) 2005-2006, Kay Sievers <kay.sievers\\@vrfy.org>, Christian Gierke -->\n <!-- git core binaries version $git_version -->\n <head>\n-<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>\n+<meta http-equiv=\"content-type\" content=\"$content_type; charset=utf-8\"/>\n <meta name=\"robots\" content=\"index, nofollow\"/>\n <title>$title</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"$stylesheet\"/>\n-- \n1.4.1.g97c7-dirty\n"},{"id":"23634","messageId":"1152613179634-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":"11526131781900-git-send-email-alp@atoker.com","subject":"[PATCH] gitweb: Include a site name in page titles","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:35Z","receivedAt":"2006-07-11T10:19:35Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"Tip Of The Day:\n    <title>: the most important element of a quality Web page.\n\nThis helps users tell one 'git' bookmark apart from the other in their\nbrowser and improves the indexing of gitweb sites in Web search engines.\n\nSigned-off-by: Alp Toker <alp@atoker.com>\n---\n gitweb/gitweb.cgi |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex bd9b9de..b12417b 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -46,6 +46,9 @@ if (! -d $git_temp) {\n # target of the home link on top of all pages\n our $home_link = $my_uri;\n \n+# name of your site or organization to appear in page titles\n+our $site_name = \"Untitled\";\n+\n # html text to include at home page\n our $home_text = \"indextext.html\";\n \n@@ -280,7 +283,7 @@ sub git_header_html {\n \tmy $status = shift || \"200 OK\";\n \tmy $expires = shift;\n \n-\tmy $title = \"git\";\n+\tmy $title = \"$site_name git\";\n \tif (defined $project) {\n \t\t$title .= \" - $project\";\n \t\tif (defined $action) {\n@@ -1770,7 +1773,7 @@ sub git_opml {\n \tprint \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\".\n \t      \"<opml version=\\\"1.0\\\">\\n\".\n \t      \"<head>\".\n-\t      \"  <title>Git OPML Export</title>\\n\".\n+\t      \"  <title>$site_name Git OPML Export</title>\\n\".\n \t      \"</head>\\n\".\n \t      \"<body>\\n\".\n \t      \"<outline text=\\\"git RSS feeds\\\">\\n\";\n-- \n1.4.1.g97c7-dirty\n"},{"id":"23630","messageId":"11526131791902-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":"1152613179634-git-send-email-alp@atoker.com","subject":"[PATCH] gitweb: Use the git binary in the search path by default","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:36Z","receivedAt":"2006-07-11T10:19:36Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"Introduce a sensible default for the location of the git binary used by\ngitweb. This means one less option to configure when deploying gitweb if\ngit is in the search path.\n\nThis patch also makes invocations of core git commands go through the\n'git' binary itself, which might help system administrators lock down\ntheir CGI environment for security.\n\nSigned-off-by: Alp Toker <alp@atoker.com>\n---\n gitweb/gitweb.cgi |   61 ++++++++++++++++++++++++-----------------------------\n 1 files changed, 28 insertions(+), 33 deletions(-)\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex b12417b..0bb46b9 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -22,20 +22,15 @@ our $my_url = $cgi->url();\n our $my_uri = $cgi->url(-absolute => 1);\n our $rss_link = \"\";\n \n-# location of the git-core binaries\n-our $gitbin = \"/usr/bin\";\n+# core git binary to use, optionally specified as an absolute path\n+our $GIT = \"git\";\n \n # absolute fs-path which will be prepended to the project path\n #our $projectroot = \"/pub/scm\";\n our $projectroot = \"/home/kay/public_html/pub/scm\";\n \n-# version of the git-core binaries\n-our $git_version = qx($gitbin/git --version);\n-if ($git_version =~ m/git version (.*)$/) {\n-\t$git_version = $1;\n-} else {\n-\t$git_version = \"unknown\";\n-}\n+# version of the core git binary\n+our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : \"unknown\";\n \n # location for temporary files needed for diffs\n our $git_temp = \"/tmp/gitweb\";\n@@ -391,7 +386,7 @@ sub die_error {\n sub git_get_type {\n \tmy $hash = shift;\n \n-\topen my $fd, \"-|\", \"$gitbin/git-cat-file -t $hash\" or return;\n+\topen my $fd, \"-|\", \"$GIT cat-file -t $hash\" or return;\n \tmy $type = <$fd>;\n \tclose $fd or return;\n \tchomp $type;\n@@ -403,7 +398,7 @@ sub git_read_head {\n \tmy $oENV = $ENV{'GIT_DIR'};\n \tmy $retval = undef;\n \t$ENV{'GIT_DIR'} = \"$projectroot/$project\";\n-\tif (open my $fd, \"-|\", \"$gitbin/git-rev-parse\", \"--verify\", \"HEAD\") {\n+\tif (open my $fd, \"-|\", $GIT, \"rev-parse\", \"--verify\", \"HEAD\") {\n \t\tmy $head = <$fd>;\n \t\tclose $fd;\n \t\tif (defined $head && $head =~ /^([0-9a-fA-F]{40})$/) {\n@@ -443,7 +438,7 @@ sub git_read_tag {\n \tmy %tag;\n \tmy @comment;\n \n-\topen my $fd, \"-|\", \"$gitbin/git-cat-file tag $tag_id\" or return;\n+\topen my $fd, \"-|\", \"$GIT cat-file tag $tag_id\" or return;\n \t$tag{'id'} = $tag_id;\n \twhile (my $line = <$fd>) {\n \t\tchomp $line;\n@@ -515,7 +510,7 @@ sub git_read_commit {\n \t\t@commit_lines = @$commit_text;\n \t} else {\n \t\t$/ = \"\\0\";\n-\t\topen my $fd, \"-|\", \"$gitbin/git-rev-list --header --parents --max-count=1 $commit_id\" or return;\n+\t\topen my $fd, \"-|\", \"$GIT rev-list --header --parents --max-count=1 $commit_id\" or return;\n \t\t@commit_lines = split '\\n', <$fd>;\n \t\tclose $fd or return;\n \t\t$/ = \"\\n\";\n@@ -613,7 +608,7 @@ sub git_diff_print {\n \tif (defined $from) {\n \t\t$from_tmp = \"$git_temp/gitweb_\" . $$ . \"_from\";\n \t\topen my $fd2, \"> $from_tmp\";\n-\t\topen my $fd, \"-|\", \"$gitbin/git-cat-file blob $from\";\n+\t\topen my $fd, \"-|\", \"$GIT cat-file blob $from\";\n \t\tmy @file = <$fd>;\n \t\tprint $fd2 @file;\n \t\tclose $fd2;\n@@ -624,7 +619,7 @@ sub git_diff_print {\n \tif (defined $to) {\n \t\t$to_tmp = \"$git_temp/gitweb_\" . $$ . \"_to\";\n \t\topen my $fd2, \"> $to_tmp\";\n-\t\topen my $fd, \"-|\", \"$gitbin/git-cat-file blob $to\";\n+\t\topen my $fd, \"-|\", \"$GIT cat-file blob $to\";\n \t\tmy @file = <$fd>;\n \t\tprint $fd2 @file;\n \t\tclose $fd2;\n@@ -843,7 +838,7 @@ sub git_get_project_config {\n \t$key =~ s/^gitweb\\.//;\n \treturn if ($key =~ m/\\W/);\n \n-\tmy $val = qx($gitbin/git-repo-config --get gitweb.$key);\n+\tmy $val = qx($GIT repo-config --get gitweb.$key);\n \treturn ($val);\n }\n \n@@ -1065,7 +1060,7 @@ sub git_summary {\n \t      \"<tr><td>owner</td><td>$owner</td></tr>\\n\" .\n \t      \"<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\\n\" .\n \t      \"</table>\\n\";\n-\topen my $fd, \"-|\", \"$gitbin/git-rev-list --max-count=17 \" . git_read_head($project) or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT rev-list --max-count=17 \" . git_read_head($project) or die_error(undef, \"Open failed.\");\n \tmy (@revlist) = map { chomp; $_ } <$fd>;\n \tclose $fd;\n \tprint \"<div>\\n\" .\n@@ -1253,7 +1248,7 @@ sub git_blame {\n \t\t$hash = git_get_hash_by_path($hash_base, $file_name, \"blob\")\n \t\t\tor die_error(undef, \"Error lookup file.\");\n \t}\n-\topen ($fd, \"-|\", \"$gitbin/git-annotate\", '-l', '-t', '-r', $file_name, $hash_base)\n+\topen ($fd, \"-|\", $GIT, \"annotate\", '-l', '-t', '-r', $file_name, $hash_base)\n \t\tor die_error(undef, \"Open failed.\");\n \tgit_header_html();\n \tprint \"<div class=\\\"page_nav\\\">\\n\" .\n@@ -1448,7 +1443,7 @@ sub git_get_hash_by_path {\n \tmy $tree = $base;\n \tmy @parts = split '/', $path;\n \twhile (my $part = shift @parts) {\n-\t\topen my $fd, \"-|\", \"$gitbin/git-ls-tree $tree\" or die_error(undef, \"Open git-ls-tree failed.\");\n+\t\topen my $fd, \"-|\", \"$GIT ls-tree $tree\" or die_error(undef, \"Open git-ls-tree failed.\");\n \t\tmy (@entries) = map { chomp; $_ } <$fd>;\n \t\tclose $fd or return undef;\n \t\tforeach my $line (@entries) {\n@@ -1535,7 +1530,7 @@ sub git_blob_plain_mimetype {\n \n sub git_blob_plain {\n \tmy $type = shift;\n-\topen my $fd, \"-|\", \"$gitbin/git-cat-file blob $hash\" or die_error(\"Couldn't cat $file_name, $hash\");\n+\topen my $fd, \"-|\", \"$GIT cat-file blob $hash\" or die_error(\"Couldn't cat $file_name, $hash\");\n \n \t$type ||= git_blob_plain_mimetype($fd, $file_name);\n \n@@ -1562,7 +1557,7 @@ sub git_blob {\n \t\t$hash = git_get_hash_by_path($base, $file_name, \"blob\") || die_error(undef, \"Error lookup file.\");\n \t}\n \tmy $have_blame = git_get_project_config_bool ('blame');\n-\topen my $fd, \"-|\", \"$gitbin/git-cat-file blob $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT cat-file blob $hash\" or die_error(undef, \"Open failed.\");\n \tmy $mimetype = git_blob_plain_mimetype($fd, $file_name);\n \tif ($mimetype !~ m/^text\\//) {\n \t\tclose $fd;\n@@ -1628,7 +1623,7 @@ sub git_tree {\n \t\t}\n \t}\n \t$/ = \"\\0\";\n-\topen my $fd, \"-|\", \"$gitbin/git-ls-tree -z $hash\" or die_error(undef, \"Open git-ls-tree failed.\");\n+\topen my $fd, \"-|\", \"$GIT ls-tree -z $hash\" or die_error(undef, \"Open git-ls-tree failed.\");\n \tchomp (my (@entries) = <$fd>);\n \tclose $fd or die_error(undef, \"Reading tree failed.\");\n \t$/ = \"\\n\";\n@@ -1711,7 +1706,7 @@ #\t\t\t      \" | \" . $cgi->a({-href => \"$my\n \n sub git_rss {\n \t# http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ\n-\topen my $fd, \"-|\", \"$gitbin/git-rev-list --max-count=150 \" . git_read_head($project) or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT rev-list --max-count=150 \" . git_read_head($project) or die_error(undef, \"Open failed.\");\n \tmy (@revlist) = map { chomp; $_ } <$fd>;\n \tclose $fd or die_error(undef, \"Reading rev-list failed.\");\n \tprint $cgi->header(-type => 'text/xml', -charset => 'utf-8');\n@@ -1731,7 +1726,7 @@ sub git_rss {\n \t\t\tlast;\n \t\t}\n \t\tmy %cd = date_str($co{'committer_epoch'});\n-\t\topen $fd, \"-|\", \"$gitbin/git-diff-tree -r $co{'parent'} $co{'id'}\" or next;\n+\t\topen $fd, \"-|\", \"$GIT diff-tree -r $co{'parent'} $co{'id'}\" or next;\n \t\tmy @difftree = map { chomp; $_ } <$fd>;\n \t\tclose $fd or next;\n \t\tprint \"<item>\\n\" .\n@@ -1819,7 +1814,7 @@ sub git_log {\n \t      \" | \" . $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=tree;h=$hash;hb=$hash\")}, \"tree\") . \"<br/>\\n\";\n \n \tmy $limit = sprintf(\"--max-count=%i\", (100 * ($page+1)));\n-\topen my $fd, \"-|\", \"$gitbin/git-rev-list $limit $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT rev-list $limit $hash\" or die_error(undef, \"Open failed.\");\n \tmy (@revlist) = map { chomp; $_ } <$fd>;\n \tclose $fd;\n \n@@ -1910,7 +1905,7 @@ sub git_commit {\n \t\t$root = \" --root\";\n \t\t$parent = \"\";\n \t}\n-\topen my $fd, \"-|\", \"$gitbin/git-diff-tree -r -M $root $parent $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT diff-tree -r -M $root $parent $hash\" or die_error(undef, \"Open failed.\");\n \t@difftree = map { chomp; $_ } <$fd>;\n \tclose $fd or die_error(undef, \"Reading diff-tree failed.\");\n \n@@ -2152,7 +2147,7 @@ sub git_commitdiff {\n \tif (!defined $hash_parent) {\n \t\t$hash_parent = $co{'parent'};\n \t}\n-\topen my $fd, \"-|\", \"$gitbin/git-diff-tree -r $hash_parent $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT diff-tree -r $hash_parent $hash\" or die_error(undef, \"Open failed.\");\n \tmy (@difftree) = map { chomp; $_ } <$fd>;\n \tclose $fd or die_error(undef, \"Reading diff-tree failed.\");\n \n@@ -2242,14 +2237,14 @@ sub git_commitdiff {\n \n sub git_commitdiff_plain {\n \tmkdir($git_temp, 0700);\n-\topen my $fd, \"-|\", \"$gitbin/git-diff-tree -r $hash_parent $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT diff-tree -r $hash_parent $hash\" or die_error(undef, \"Open failed.\");\n \tmy (@difftree) = map { chomp; $_ } <$fd>;\n \tclose $fd or die_error(undef, \"Reading diff-tree failed.\");\n \n \t# try to figure out the next tag after this commit\n \tmy $tagname;\n \tmy $refs = read_info_ref(\"tags\");\n-\topen $fd, \"-|\", \"$gitbin/git-rev-list HEAD\";\n+\topen $fd, \"-|\", \"$GIT rev-list HEAD\";\n \tchomp (my (@commits) = <$fd>);\n \tclose $fd;\n \tforeach my $commit (@commits) {\n@@ -2320,7 +2315,7 @@ sub git_history {\n \tprint \"<div class=\\\"page_path\\\"><b>/\" . esc_html($file_name) . \"</b><br/></div>\\n\";\n \n \topen my $fd, \"-|\",\n-\t\t\"$gitbin/git-rev-list --full-history $hash -- \\'$file_name\\'\";\n+\t\t\"$GIT rev-list --full-history $hash -- \\'$file_name\\'\";\n \tprint \"<table cellspacing=\\\"0\\\">\\n\";\n \tmy $alternate = 0;\n \twhile (my $line = <$fd>) {\n@@ -2407,7 +2402,7 @@ sub git_search {\n \tmy $alternate = 0;\n \tif ($commit_search) {\n \t\t$/ = \"\\0\";\n-\t\topen my $fd, \"-|\", \"$gitbin/git-rev-list --header --parents $hash\" or next;\n+\t\topen my $fd, \"-|\", \"$GIT rev-list --header --parents $hash\" or next;\n \t\twhile (my $commit_text = <$fd>) {\n \t\t\tif (!grep m/$searchtext/i, $commit_text) {\n \t\t\t\tnext;\n@@ -2457,7 +2452,7 @@ sub git_search {\n \n \tif ($pickaxe_search) {\n \t\t$/ = \"\\n\";\n-\t\topen my $fd, \"-|\", \"$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin -S\\'$searchtext\\'\";\n+\t\topen my $fd, \"-|\", \"$GIT rev-list $hash | $GIT diff-tree -r --stdin -S\\'$searchtext\\'\";\n \t\tundef %co;\n \t\tmy @files;\n \t\twhile (my $line = <$fd>) {\n@@ -2528,7 +2523,7 @@ sub git_shortlog {\n \t      \" | \" . $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=tree;h=$hash;hb=$hash\")}, \"tree\") . \"<br/>\\n\";\n \n \tmy $limit = sprintf(\"--max-count=%i\", (100 * ($page+1)));\n-\topen my $fd, \"-|\", \"$gitbin/git-rev-list $limit $hash\" or die_error(undef, \"Open failed.\");\n+\topen my $fd, \"-|\", \"$GIT rev-list $limit $hash\" or die_error(undef, \"Open failed.\");\n \tmy (@revlist) = map { chomp; $_ } <$fd>;\n \tclose $fd;\n \n-- \n1.4.1.g97c7-dirty\n"},{"id":"23632","messageId":"11526131792773-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":"11526131791902-git-send-email-alp@atoker.com","subject":"[PATCH] git-send-email: Remove redundant Reply-To header","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:37Z","receivedAt":"2006-07-11T10:19:37Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"There is no sense in duplicating the sender address in Reply-To as it's\nalready provided in the From header.\n\nSigned-off-by: Alp Toker <alp@atoker.com>\n---\n git-send-email.perl |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 64a8eef..1e2777c 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -413,7 +413,6 @@ sub send_message\n To: $to\n Cc: $cc\n Subject: $subject\n-Reply-To: $from\n Date: $date\n Message-Id: $message_id\n X-Mailer: git-send-email $gitversion\n-- \n1.4.1.g97c7-dirty\n"},{"id":"23633","messageId":"11526131792377-git-send-email-alp@atoker.com","threadId":"4850","inReplyTo":"11526131792773-git-send-email-alp@atoker.com","subject":"[PATCH] Install built-ins as symlinks","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T10:19:38Z","receivedAt":"2006-07-11T10:19:38Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"Doing this now will save headache in the long run, avoiding mismatched\nversions of installed utilities and dangling copies of removed or\nrenamed git commands that still appear to work. It also makes screwups\nwhen packaging git or making system backups less likely.\n\nBusyBox has been doing it this way for years.\n\nSigned-off-by: Alp Toker <alp@atoker.com>\n---\n Makefile |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 5b7bac8..cb5a5cc 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -538,7 +538,7 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJ\n builtin-help.o: common-cmds.h\n \n $(BUILT_INS): git$X\n-\trm -f $@ && ln git$X $@\n+\tln -sf git$X $@\n \n common-cmds.h: Documentation/git-*.txt\n \t./generate-cmdlist.sh > $@+\n@@ -748,7 +748,7 @@ install: all\n \t\tcp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \\\n \tfi\n-\t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n+\t$(foreach p,$(BUILT_INS), ln -sf 'git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n \n install-doc:\n \t$(MAKE) -C Documentation install\n-- \n1.4.1.g97c7-dirty\n"},{"id":"23635","messageId":"44B38842.10609@op5.se","threadId":"4850","inReplyTo":"11526131792377-git-send-email-alp@atoker.com","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-07-11T11:15:14Z","receivedAt":"2006-07-11T11:15:14Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Alp Toker wrote:\n> Doing this now will save headache in the long run, avoiding mismatched\n> versions of installed utilities and dangling copies of removed or\n> renamed git commands that still appear to work. It also makes screwups\n> when packaging git or making system backups less likely.\n> \n> BusyBox has been doing it this way for years.\n> \n\nGit has been doing it for a couple of months, although it uses hardlinks \ninstead of symlinks. Hardlinks are slightly faster and actually consume \na little less hard-disk space, although the differences are so small you \nwon't notice it unless you do several thousand invocations.\n\n>  \n>  $(BUILT_INS): git$X\n> -\trm -f $@ && ln git$X $@\n> +\tln -sf git$X $@\n>  \n\nThe -f option to ln is not very portable, hence the \"rm && ln\" construct.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"23636","messageId":"46a038f90607110448p40fd8984ke3e15639cf5ecf46@mail.gmail.com","threadId":"4850","inReplyTo":"1152613179634-git-send-email-alp@atoker.com","subject":"Re: [PATCH] gitweb: Include a site name in page titles","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-07-11T11:48:58Z","receivedAt":"2006-07-11T11:48:58Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"> +# name of your site or organization to appear in page titles\n> +our $site_name = \"Untitled\";\n\nI generally agree, but as a default, $ENV{SERVER_NAME} should be better.\n\ncheers,\n\n\nmartin\n"},{"id":"23638","messageId":"Pine.LNX.4.63.0607111614550.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4850","inReplyTo":"11526131792377-git-send-email-alp@atoker.com","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-11T14:16:56Z","receivedAt":"2006-07-11T14:16:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 11 Jul 2006, Alp Toker wrote:\n\n> Doing this now will save headache in the long run, avoiding mismatched\n> versions of installed utilities and dangling copies of removed or\n> renamed git commands that still appear to work. It also makes screwups\n> when packaging git or making system backups less likely.\n\nCould we please fix things, which are broken? Not things which work?\n\nCiao,\nDscho\n"},{"id":"23642","messageId":"44B3BC94.3000204@atoker.com","threadId":"4850","inReplyTo":"Pine.LNX.4.63.0607111614550.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Alp Toker","fromEmail":"alp@atoker.com","sentAt":"2006-07-11T14:58:28Z","receivedAt":"2006-07-11T14:58:28Z","isPatch":true,"sender":{"key":"alp@atoker.com","avatar":"https://gravatar.com/avatar/5367b73f1bb2598314e084847e4f45c303514c7fd192cfa9aa3c3437511567cd?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n>> Doing this now will save headache in the long run, avoiding mismatched\n>> versions of installed utilities and dangling copies of removed or\n>> renamed git commands that still appear to work. It also makes screwups\n>> when packaging git or making system backups less likely.\n> \n> Could we please fix things, which are broken? Not things which work?\n\nThere are maybe a dozen arguments for and against the use of symlinks \nhere, some of which Andreas has helpfully explained in his reply. You, \non the other hand, have managed not to mention a single one of them.\n\nIf you don't have the technical background to review a certain patch, \nplease don't add to the noise.\n"},{"id":"23649","messageId":"Pine.LNX.4.63.0607111951350.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4850","inReplyTo":"44B3BC94.3000204@atoker.com","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-11T18:02:53Z","receivedAt":"2006-07-11T18:02:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 11 Jul 2006, Alp Toker wrote:\n\n> Johannes Schindelin wrote:\n> > > Doing this now will save headache in the long run, avoiding mismatched\n> > > versions of installed utilities and dangling copies of removed or\n> > > renamed git commands that still appear to work. It also makes screwups\n> > > when packaging git or making system backups less likely.\n> > \n> > Could we please fix things, which are broken? Not things which work?\n> \n> There are maybe a dozen arguments for and against the use of symlinks here,\n> some of which Andreas has helpfully explained in his reply. You, on the other\n> hand, have managed not to mention a single one of them.\n\nYes. That is correct. I hoped I did not need to.\n\nThe consistency is a non-issue, because the Makefile rules Do The Right \nThing.\n\nI happen to run git without installing it, mainly because I like to fiddle \naround with git. Now, if \"git\" does not compile for some reason, with \nsymlinks I lose git-diff, git-ls-files, etc.\n\nAnd -- just maybe -- I _did_ mention a single reason to keep hard links: \nIt works now. So why change it?\n\n> If you don't have the technical background to review a certain patch, please\n> don't add to the noise.\n\nIt is not nice to tell a dumb man how dumb he is. Mommy! I am so sorry \nthat I lack the technical background. Please apologize for the noise.\n\nCiao,\nDscho\n"},{"id":"23650","messageId":"20060711183642.GB13776@pasky.or.cz","threadId":"4850","inReplyTo":"11526131792377-git-send-email-alp@atoker.com","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-07-11T18:36:42Z","receivedAt":"2006-07-11T18:36:42Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Jul 11, 2006 at 12:19:38PM CEST, I got a letter\nwhere Alp Toker <alp@atoker.com> said that...\n> diff --git a/Makefile b/Makefile\n> index 5b7bac8..cb5a5cc 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -538,7 +538,7 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJ\n>  builtin-help.o: common-cmds.h\n>  \n>  $(BUILT_INS): git$X\n> -\trm -f $@ && ln git$X $@\n> +\tln -sf git$X $@\n>  \n>  common-cmds.h: Documentation/git-*.txt\n>  \t./generate-cmdlist.sh > $@+\n\nDoesn't the git$X dependency become pointless at this point?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nSnow falling on Perl. White noise covering line noise.\nHides all the bugs too. -- J. Putnam\n"},{"id":"23652","messageId":"20060711184838.GC13776@pasky.or.cz","threadId":"4850","inReplyTo":"Pine.LNX.4.63.0607111951350.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-07-11T18:48:38Z","receivedAt":"2006-07-11T18:48:38Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nDear diary, on Tue, Jul 11, 2006 at 08:02:53PM CEST, I got a letter\nwhere Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...\n> The consistency is a non-issue, because the Makefile rules Do The Right \n> Thing.\n\n  once in a while, a Git command disappears, it has already happenned\nseveral times (git-rename, git-octopus, git-apply-patch-script, I'm sure\nI'd find some more if I looked better; looking into future, I'm not sure\nabout the further life expectancy of e.g. git-resolve or git-ssh-fetch).\n\n> I happen to run git without installing it, mainly because I like to fiddle \n> around with git. Now, if \"git\" does not compile for some reason, with \n> symlinks I lose git-diff, git-ls-files, etc.\n\n  If \"git\" doesn't compile nothing overwrites your previous \"git\" binary\nand things stay working. If \"git\" did compile but is broken, the\nMakefile already rehardlinked the other files anyway so you are still\nscrewed.\n\n> And -- just maybe -- I _did_ mention a single reason to keep hard links: \n> It works now. So why change it?\n\n  The original patch mentioned why hardlinks are bad, so if you argue\nthat the raised points are moot, you should give some substance to your\nargument.\n\n> > If you don't have the technical background to review a certain patch, please\n> > don't add to the noise.\n> \n> It is not nice to tell a dumb man how dumb he is. Mommy! I am so sorry \n> that I lack the technical background. Please apologize for the noise.\n\n  Please help to maintain the very friendly nature of this list we\nhave been enjoying so far.\n\n  Thanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nSnow falling on Perl. White noise covering line noise.\nHides all the bugs too. -- J. Putnam\n"},{"id":"23657","messageId":"7v64i353f3.fsf@assigned-by-dhcp.cox.net","threadId":"4850","inReplyTo":"46a038f90607110448p40fd8984ke3e15639cf5ecf46@mail.gmail.com","subject":"Re: [PATCH] gitweb: Include a site name in page titles","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-11T19:48:00Z","receivedAt":"2006-07-11T19:48:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Martin Langhoff\" <martin.langhoff@gmail.com> writes:\n\n>> +# name of your site or organization to appear in page titles\n>> +our $site_name = \"Untitled\";\n>\n> I generally agree, but as a default, $ENV{SERVER_NAME} should be better.\n\nSounds like a good suggestion.\n"},{"id":"23659","messageId":"7vzmff3ogn.fsf@assigned-by-dhcp.cox.net","threadId":"4850","inReplyTo":"11526131791902-git-send-email-alp@atoker.com","subject":"Re: [PATCH] gitweb: Use the git binary in the search path by default","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-11T19:56:24Z","receivedAt":"2006-07-11T19:56:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alp Toker <alp@atoker.com> writes:\n\n> Introduce a sensible default for the location of the git binary used by\n> gitweb. This means one less option to configure when deploying gitweb if\n> git is in the search path.\n\nWhile I think the part of the change to make things go through\nthe single \"git\" wrapper is a good idea, the comment to \"our\n$GIT\" that says \"absolute path is optional\" makes this change\nmore like \"assume PATH your webserver process uses is sensible\",\nnot \"introduce a sensible default\".\n\nSo I would prefer to do that part like this:\n\n-# location of the git-core binaries\n-our $gitbin = \"/usr/bin\";\n+# core git wrapper -- if your webserver runs with a sensible PATH\n+# you can just say \"git\" without using absolute pathname here.\n+our $GIT = \"/usr/bin/git\";\n"},{"id":"23672","messageId":"1152657439.3700.7.camel@dv","threadId":"4850","inReplyTo":"11526131782190-git-send-email-alp@atoker.com","subject":"Re: [PATCH] Typo fix","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2006-07-11T22:37:19Z","receivedAt":"2006-07-11T22:37:19Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Hello Alp,\n\nOn Tue, 2006-07-11 at 11:19 +0100, Alp Toker wrote:\n> Signed-off-by: Alp Toker <alp@atoker.com>\n> ---\n> -wrote you about that phantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.\n> +wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.\n\nYou are overreacting.  I checked all sources for typos and of course I\nsaw \"phantastic\" but I assumed it was intentional.  We don't want the\ndocumentation to be devoid of humor.  Just in case, British spelling\nlike \"behaviour\" was also preserved out of respect to the authors.\n \n-- \nRegards,\nPavel Roskin\n"},{"id":"23676","messageId":"20060712000103.GA5910@steel.home","threadId":"4850","inReplyTo":"20060711184838.GC13776@pasky.or.cz","subject":"Re: [PATCH] Install built-ins as symlinks","fromName":"Alex Riesen","fromEmail":"fork0@t-online.de","sentAt":"2006-07-12T00:01:03Z","receivedAt":"2006-07-12T00:01:03Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Petr Baudis, Tue, Jul 11, 2006 20:48:38 +0200:\n> > And -- just maybe -- I _did_ mention a single reason to keep hard links: \n> > It works now. So why change it?\n> \n>   The original patch mentioned why hardlinks are bad, so if you argue\n> that the raised points are moot, you should give some substance to your\n> argument.\n\nWindows will add that substance, even if it is a dirty one: symlinks\ndon't work there properly (cygwin makes that very stupid .lnk file).\n"}]}