# [PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible

17 messages from 2006-07-11 to 2006-07-12. Participants: Alp Toker, Andreas Ericsson, Martin Langhoff, Johannes Schindelin, Petr Baudis, Junio C Hamano, Pavel Roskin, Alex Riesen.
Thread: https://gitlist.dev/t/4850

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] Typo fix
Message-ID: <11526131782190-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/11526131782190-git-send-email-alp%40atoker.com

```
Signed-off-by: Alp Toker <alp@atoker.com>
---
 Documentation/git-name-rev.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index 43f8c25..37fbf66 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -33,7 +33,7 @@ EXAMPLE
 -------
 
 Given a commit, find out where it is relative to the local refs. Say somebody
-wrote you about that phantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.
+wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.
 Of course, you look into the commit, but that only tells you what happened, but
 not the context.
 
-- 
1.4.1.g97c7-dirty

```

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible
Message-ID: <11526131781900-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/11526131781900-git-send-email-alp%40atoker.com
In-Reply-To: <11526131782190-git-send-email-alp@atoker.com>

```
"The 'text/html' media type [RFC2854] is primarily for HTML, not for
XHTML. In general, this media type is NOT suitable for XHTML."

This patch makes gitweb use content negotiation to conservatively send
pages as Content-Type 'application/xhtml+xml' when the user agent
explicitly claims to support it.

It falls back to 'text/html' even if the user agent appears to
implicitly support 'application/xhtml+xml' due to a '*/*' glob, working
around an insidious bug in Internet Explorer where sending the correct
media type prevents the page from being displayed.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 gitweb/gitweb.cgi |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 2e87de4..bd9b9de 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -293,7 +293,17 @@ sub git_header_html {
 			}
 		}
 	}
-	print $cgi->header(-type=>'text/html',  -charset => 'utf-8', -status=> $status, -expires => $expires);
+	my $content_type;
+	# require explicit support from the UA if we are to send the page as
+	# 'application/xhtml+xml', otherwise send it as plain old 'text/html'.
+	# we have to do this because MSIE sometimes globs '*/*', pretending to
+	# support xhtml+xml but choking when it gets what it asked for.
+	if ($cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ && $cgi->Accept('application/xhtml+xml') != 0) {
+		$content_type = 'application/xhtml+xml';
+	} else {
+		$content_type = 'text/html';
+	}
+	print $cgi->header(-type=>$content_type,  -charset => 'utf-8', -status=> $status, -expires => $expires);
 	print <<EOF;
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -301,7 +311,7 @@ sub git_header_html {
 <!-- git web interface v$version, (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->
 <!-- git core binaries version $git_version -->
 <head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+<meta http-equiv="content-type" content="$content_type; charset=utf-8"/>
 <meta name="robots" content="index, nofollow"/>
 <title>$title</title>
 <link rel="stylesheet" type="text/css" href="$stylesheet"/>
-- 
1.4.1.g97c7-dirty

```

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] gitweb: Include a site name in page titles
Message-ID: <1152613179634-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/1152613179634-git-send-email-alp%40atoker.com
In-Reply-To: <11526131781900-git-send-email-alp@atoker.com>

```
Tip Of The Day:
    <title>: the most important element of a quality Web page.

This helps users tell one 'git' bookmark apart from the other in their
browser and improves the indexing of gitweb sites in Web search engines.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 gitweb/gitweb.cgi |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index bd9b9de..b12417b 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -46,6 +46,9 @@ if (! -d $git_temp) {
 # target of the home link on top of all pages
 our $home_link = $my_uri;
 
+# name of your site or organization to appear in page titles
+our $site_name = "Untitled";
+
 # html text to include at home page
 our $home_text = "indextext.html";
 
@@ -280,7 +283,7 @@ sub git_header_html {
 	my $status = shift || "200 OK";
 	my $expires = shift;
 
-	my $title = "git";
+	my $title = "$site_name git";
 	if (defined $project) {
 		$title .= " - $project";
 		if (defined $action) {
@@ -1770,7 +1773,7 @@ sub git_opml {
 	print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
 	      "<opml version=\"1.0\">\n".
 	      "<head>".
-	      "  <title>Git OPML Export</title>\n".
+	      "  <title>$site_name Git OPML Export</title>\n".
 	      "</head>\n".
 	      "<body>\n".
 	      "<outline text=\"git RSS feeds\">\n";
-- 
1.4.1.g97c7-dirty

```

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] gitweb: Use the git binary in the search path by default
Message-ID: <11526131791902-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/11526131791902-git-send-email-alp%40atoker.com
In-Reply-To: <1152613179634-git-send-email-alp@atoker.com>

```
Introduce a sensible default for the location of the git binary used by
gitweb. This means one less option to configure when deploying gitweb if
git is in the search path.

This patch also makes invocations of core git commands go through the
'git' binary itself, which might help system administrators lock down
their CGI environment for security.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 gitweb/gitweb.cgi |   61 ++++++++++++++++++++++++-----------------------------
 1 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index b12417b..0bb46b9 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -22,20 +22,15 @@ our $my_url = $cgi->url();
 our $my_uri = $cgi->url(-absolute => 1);
 our $rss_link = "";
 
-# location of the git-core binaries
-our $gitbin = "/usr/bin";
+# core git binary to use, optionally specified as an absolute path
+our $GIT = "git";
 
 # absolute fs-path which will be prepended to the project path
 #our $projectroot = "/pub/scm";
 our $projectroot = "/home/kay/public_html/pub/scm";
 
-# version of the git-core binaries
-our $git_version = qx($gitbin/git --version);
-if ($git_version =~ m/git version (.*)$/) {
-	$git_version = $1;
-} else {
-	$git_version = "unknown";
-}
+# version of the core git binary
+our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
 
 # location for temporary files needed for diffs
 our $git_temp = "/tmp/gitweb";
@@ -391,7 +386,7 @@ sub die_error {
 sub git_get_type {
 	my $hash = shift;
 
-	open my $fd, "-|", "$gitbin/git-cat-file -t $hash" or return;
+	open my $fd, "-|", "$GIT cat-file -t $hash" or return;
 	my $type = <$fd>;
 	close $fd or return;
 	chomp $type;
@@ -403,7 +398,7 @@ sub git_read_head {
 	my $oENV = $ENV{'GIT_DIR'};
 	my $retval = undef;
 	$ENV{'GIT_DIR'} = "$projectroot/$project";
-	if (open my $fd, "-|", "$gitbin/git-rev-parse", "--verify", "HEAD") {
+	if (open my $fd, "-|", $GIT, "rev-parse", "--verify", "HEAD") {
 		my $head = <$fd>;
 		close $fd;
 		if (defined $head && $head =~ /^([0-9a-fA-F]{40})$/) {
@@ -443,7 +438,7 @@ sub git_read_tag {
 	my %tag;
 	my @comment;
 
-	open my $fd, "-|", "$gitbin/git-cat-file tag $tag_id" or return;
+	open my $fd, "-|", "$GIT cat-file tag $tag_id" or return;
 	$tag{'id'} = $tag_id;
 	while (my $line = <$fd>) {
 		chomp $line;
@@ -515,7 +510,7 @@ sub git_read_commit {
 		@commit_lines = @$commit_text;
 	} else {
 		$/ = "\0";
-		open my $fd, "-|", "$gitbin/git-rev-list --header --parents --max-count=1 $commit_id" or return;
+		open my $fd, "-|", "$GIT rev-list --header --parents --max-count=1 $commit_id" or return;
 		@commit_lines = split '\n', <$fd>;
 		close $fd or return;
 		$/ = "\n";
@@ -613,7 +608,7 @@ sub git_diff_print {
 	if (defined $from) {
 		$from_tmp = "$git_temp/gitweb_" . $$ . "_from";
 		open my $fd2, "> $from_tmp";
-		open my $fd, "-|", "$gitbin/git-cat-file blob $from";
+		open my $fd, "-|", "$GIT cat-file blob $from";
 		my @file = <$fd>;
 		print $fd2 @file;
 		close $fd2;
@@ -624,7 +619,7 @@ sub git_diff_print {
 	if (defined $to) {
 		$to_tmp = "$git_temp/gitweb_" . $$ . "_to";
 		open my $fd2, "> $to_tmp";
-		open my $fd, "-|", "$gitbin/git-cat-file blob $to";
+		open my $fd, "-|", "$GIT cat-file blob $to";
 		my @file = <$fd>;
 		print $fd2 @file;
 		close $fd2;
@@ -843,7 +838,7 @@ sub git_get_project_config {
 	$key =~ s/^gitweb\.//;
 	return if ($key =~ m/\W/);
 
-	my $val = qx($gitbin/git-repo-config --get gitweb.$key);
+	my $val = qx($GIT repo-config --get gitweb.$key);
 	return ($val);
 }
 
@@ -1065,7 +1060,7 @@ sub git_summary {
 	      "<tr><td>owner</td><td>$owner</td></tr>\n" .
 	      "<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\n" .
 	      "</table>\n";
-	open my $fd, "-|", "$gitbin/git-rev-list --max-count=17 " . git_read_head($project) or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT rev-list --max-count=17 " . git_read_head($project) or die_error(undef, "Open failed.");
 	my (@revlist) = map { chomp; $_ } <$fd>;
 	close $fd;
 	print "<div>\n" .
@@ -1253,7 +1248,7 @@ sub git_blame {
 		$hash = git_get_hash_by_path($hash_base, $file_name, "blob")
 			or die_error(undef, "Error lookup file.");
 	}
-	open ($fd, "-|", "$gitbin/git-annotate", '-l', '-t', '-r', $file_name, $hash_base)
+	open ($fd, "-|", $GIT, "annotate", '-l', '-t', '-r', $file_name, $hash_base)
 		or die_error(undef, "Open failed.");
 	git_header_html();
 	print "<div class=\"page_nav\">\n" .
@@ -1448,7 +1443,7 @@ sub git_get_hash_by_path {
 	my $tree = $base;
 	my @parts = split '/', $path;
 	while (my $part = shift @parts) {
-		open my $fd, "-|", "$gitbin/git-ls-tree $tree" or die_error(undef, "Open git-ls-tree failed.");
+		open my $fd, "-|", "$GIT ls-tree $tree" or die_error(undef, "Open git-ls-tree failed.");
 		my (@entries) = map { chomp; $_ } <$fd>;
 		close $fd or return undef;
 		foreach my $line (@entries) {
@@ -1535,7 +1530,7 @@ sub git_blob_plain_mimetype {
 
 sub git_blob_plain {
 	my $type = shift;
-	open my $fd, "-|", "$gitbin/git-cat-file blob $hash" or die_error("Couldn't cat $file_name, $hash");
+	open my $fd, "-|", "$GIT cat-file blob $hash" or die_error("Couldn't cat $file_name, $hash");
 
 	$type ||= git_blob_plain_mimetype($fd, $file_name);
 
@@ -1562,7 +1557,7 @@ sub git_blob {
 		$hash = git_get_hash_by_path($base, $file_name, "blob") || die_error(undef, "Error lookup file.");
 	}
 	my $have_blame = git_get_project_config_bool ('blame');
-	open my $fd, "-|", "$gitbin/git-cat-file blob $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT cat-file blob $hash" or die_error(undef, "Open failed.");
 	my $mimetype = git_blob_plain_mimetype($fd, $file_name);
 	if ($mimetype !~ m/^text\//) {
 		close $fd;
@@ -1628,7 +1623,7 @@ sub git_tree {
 		}
 	}
 	$/ = "\0";
-	open my $fd, "-|", "$gitbin/git-ls-tree -z $hash" or die_error(undef, "Open git-ls-tree failed.");
+	open my $fd, "-|", "$GIT ls-tree -z $hash" or die_error(undef, "Open git-ls-tree failed.");
 	chomp (my (@entries) = <$fd>);
 	close $fd or die_error(undef, "Reading tree failed.");
 	$/ = "\n";
@@ -1711,7 +1706,7 @@ #			      " | " . $cgi->a({-href => "$my
 
 sub git_rss {
 	# http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
-	open my $fd, "-|", "$gitbin/git-rev-list --max-count=150 " . git_read_head($project) or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT rev-list --max-count=150 " . git_read_head($project) or die_error(undef, "Open failed.");
 	my (@revlist) = map { chomp; $_ } <$fd>;
 	close $fd or die_error(undef, "Reading rev-list failed.");
 	print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
@@ -1731,7 +1726,7 @@ sub git_rss {
 			last;
 		}
 		my %cd = date_str($co{'committer_epoch'});
-		open $fd, "-|", "$gitbin/git-diff-tree -r $co{'parent'} $co{'id'}" or next;
+		open $fd, "-|", "$GIT diff-tree -r $co{'parent'} $co{'id'}" or next;
 		my @difftree = map { chomp; $_ } <$fd>;
 		close $fd or next;
 		print "<item>\n" .
@@ -1819,7 +1814,7 @@ sub git_log {
 	      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
 
 	my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
-	open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT rev-list $limit $hash" or die_error(undef, "Open failed.");
 	my (@revlist) = map { chomp; $_ } <$fd>;
 	close $fd;
 
@@ -1910,7 +1905,7 @@ sub git_commit {
 		$root = " --root";
 		$parent = "";
 	}
-	open my $fd, "-|", "$gitbin/git-diff-tree -r -M $root $parent $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT diff-tree -r -M $root $parent $hash" or die_error(undef, "Open failed.");
 	@difftree = map { chomp; $_ } <$fd>;
 	close $fd or die_error(undef, "Reading diff-tree failed.");
 
@@ -2152,7 +2147,7 @@ sub git_commitdiff {
 	if (!defined $hash_parent) {
 		$hash_parent = $co{'parent'};
 	}
-	open my $fd, "-|", "$gitbin/git-diff-tree -r $hash_parent $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT diff-tree -r $hash_parent $hash" or die_error(undef, "Open failed.");
 	my (@difftree) = map { chomp; $_ } <$fd>;
 	close $fd or die_error(undef, "Reading diff-tree failed.");
 
@@ -2242,14 +2237,14 @@ sub git_commitdiff {
 
 sub git_commitdiff_plain {
 	mkdir($git_temp, 0700);
-	open my $fd, "-|", "$gitbin/git-diff-tree -r $hash_parent $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT diff-tree -r $hash_parent $hash" or die_error(undef, "Open failed.");
 	my (@difftree) = map { chomp; $_ } <$fd>;
 	close $fd or die_error(undef, "Reading diff-tree failed.");
 
 	# try to figure out the next tag after this commit
 	my $tagname;
 	my $refs = read_info_ref("tags");
-	open $fd, "-|", "$gitbin/git-rev-list HEAD";
+	open $fd, "-|", "$GIT rev-list HEAD";
 	chomp (my (@commits) = <$fd>);
 	close $fd;
 	foreach my $commit (@commits) {
@@ -2320,7 +2315,7 @@ sub git_history {
 	print "<div class=\"page_path\"><b>/" . esc_html($file_name) . "</b><br/></div>\n";
 
 	open my $fd, "-|",
-		"$gitbin/git-rev-list --full-history $hash -- \'$file_name\'";
+		"$GIT rev-list --full-history $hash -- \'$file_name\'";
 	print "<table cellspacing=\"0\">\n";
 	my $alternate = 0;
 	while (my $line = <$fd>) {
@@ -2407,7 +2402,7 @@ sub git_search {
 	my $alternate = 0;
 	if ($commit_search) {
 		$/ = "\0";
-		open my $fd, "-|", "$gitbin/git-rev-list --header --parents $hash" or next;
+		open my $fd, "-|", "$GIT rev-list --header --parents $hash" or next;
 		while (my $commit_text = <$fd>) {
 			if (!grep m/$searchtext/i, $commit_text) {
 				next;
@@ -2457,7 +2452,7 @@ sub git_search {
 
 	if ($pickaxe_search) {
 		$/ = "\n";
-		open my $fd, "-|", "$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin -S\'$searchtext\'";
+		open my $fd, "-|", "$GIT rev-list $hash | $GIT diff-tree -r --stdin -S\'$searchtext\'";
 		undef %co;
 		my @files;
 		while (my $line = <$fd>) {
@@ -2528,7 +2523,7 @@ sub git_shortlog {
 	      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
 
 	my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
-	open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed.");
+	open my $fd, "-|", "$GIT rev-list $limit $hash" or die_error(undef, "Open failed.");
 	my (@revlist) = map { chomp; $_ } <$fd>;
 	close $fd;
 
-- 
1.4.1.g97c7-dirty

```

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] git-send-email: Remove redundant Reply-To header
Message-ID: <11526131792773-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/11526131792773-git-send-email-alp%40atoker.com
In-Reply-To: <11526131791902-git-send-email-alp@atoker.com>

```
There is no sense in duplicating the sender address in Reply-To as it's
already provided in the From header.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 git-send-email.perl |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 64a8eef..1e2777c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -413,7 +413,6 @@ sub send_message
 To: $to
 Cc: $cc
 Subject: $subject
-Reply-To: $from
 Date: $date
 Message-Id: $message_id
 X-Mailer: git-send-email $gitversion
-- 
1.4.1.g97c7-dirty

```

## Alp Toker, 2006-07-11 10:19

Subject: [PATCH] Install built-ins as symlinks
Message-ID: <11526131792377-git-send-email-alp@atoker.com>
URL: https://gitlist.dev/e/11526131792377-git-send-email-alp%40atoker.com
In-Reply-To: <11526131792773-git-send-email-alp@atoker.com>

```
Doing this now will save headache in the long run, avoiding mismatched
versions of installed utilities and dangling copies of removed or
renamed git commands that still appear to work. It also makes screwups
when packaging git or making system backups less likely.

BusyBox has been doing it this way for years.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 5b7bac8..cb5a5cc 100644
--- a/Makefile
+++ b/Makefile
@@ -538,7 +538,7 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJ
 builtin-help.o: common-cmds.h
 
 $(BUILT_INS): git$X
-	rm -f $@ && ln git$X $@
+	ln -sf git$X $@
 
 common-cmds.h: Documentation/git-*.txt
 	./generate-cmdlist.sh > $@+
@@ -748,7 +748,7 @@ install: all
 		cp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
 			'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
 	fi
-	$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+	$(foreach p,$(BUILT_INS), ln -sf 'git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
 
 install-doc:
 	$(MAKE) -C Documentation install
-- 
1.4.1.g97c7-dirty

```

## Andreas Ericsson, 2006-07-11 11:15

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <44B38842.10609@op5.se>
URL: https://gitlist.dev/e/44B38842.10609%40op5.se
In-Reply-To: <11526131792377-git-send-email-alp@atoker.com>

```
Alp Toker wrote:
> Doing this now will save headache in the long run, avoiding mismatched
> versions of installed utilities and dangling copies of removed or
> renamed git commands that still appear to work. It also makes screwups
> when packaging git or making system backups less likely.
> 
> BusyBox has been doing it this way for years.
> 

Git has been doing it for a couple of months, although it uses hardlinks 
instead of symlinks. Hardlinks are slightly faster and actually consume 
a little less hard-disk space, although the differences are so small you 
won't notice it unless you do several thousand invocations.

>  
>  $(BUILT_INS): git$X
> -	rm -f $@ && ln git$X $@
> +	ln -sf git$X $@
>  

The -f option to ln is not very portable, hence the "rm && ln" construct.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```

## Martin Langhoff, 2006-07-11 11:48

Subject: Re: [PATCH] gitweb: Include a site name in page titles
Message-ID: <46a038f90607110448p40fd8984ke3e15639cf5ecf46@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90607110448p40fd8984ke3e15639cf5ecf46%40mail.gmail.com
In-Reply-To: <1152613179634-git-send-email-alp@atoker.com>

```
> +# name of your site or organization to appear in page titles
> +our $site_name = "Untitled";

I generally agree, but as a default, $ENV{SERVER_NAME} should be better.

cheers,


martin

```

## Johannes Schindelin, 2006-07-11 14:16

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <Pine.LNX.4.63.0607111614550.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607111614550.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <11526131792377-git-send-email-alp@atoker.com>

```
Hi,

On Tue, 11 Jul 2006, Alp Toker wrote:

> Doing this now will save headache in the long run, avoiding mismatched
> versions of installed utilities and dangling copies of removed or
> renamed git commands that still appear to work. It also makes screwups
> when packaging git or making system backups less likely.

Could we please fix things, which are broken? Not things which work?

Ciao,
Dscho

```

## Alp Toker, 2006-07-11 14:58

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <44B3BC94.3000204@atoker.com>
URL: https://gitlist.dev/e/44B3BC94.3000204%40atoker.com
In-Reply-To: <Pine.LNX.4.63.0607111614550.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:
>> Doing this now will save headache in the long run, avoiding mismatched
>> versions of installed utilities and dangling copies of removed or
>> renamed git commands that still appear to work. It also makes screwups
>> when packaging git or making system backups less likely.
> 
> Could we please fix things, which are broken? Not things which work?

There are maybe a dozen arguments for and against the use of symlinks 
here, some of which Andreas has helpfully explained in his reply. You, 
on the other hand, have managed not to mention a single one of them.

If you don't have the technical background to review a certain patch, 
please don't add to the noise.

```

## Johannes Schindelin, 2006-07-11 18:02

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <Pine.LNX.4.63.0607111951350.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607111951350.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <44B3BC94.3000204@atoker.com>

```
Hi,

On Tue, 11 Jul 2006, Alp Toker wrote:

> Johannes Schindelin wrote:
> > > Doing this now will save headache in the long run, avoiding mismatched
> > > versions of installed utilities and dangling copies of removed or
> > > renamed git commands that still appear to work. It also makes screwups
> > > when packaging git or making system backups less likely.
> > 
> > Could we please fix things, which are broken? Not things which work?
> 
> There are maybe a dozen arguments for and against the use of symlinks here,
> some of which Andreas has helpfully explained in his reply. You, on the other
> hand, have managed not to mention a single one of them.

Yes. That is correct. I hoped I did not need to.

The consistency is a non-issue, because the Makefile rules Do The Right 
Thing.

I happen to run git without installing it, mainly because I like to fiddle 
around with git. Now, if "git" does not compile for some reason, with 
symlinks I lose git-diff, git-ls-files, etc.

And -- just maybe -- I _did_ mention a single reason to keep hard links: 
It works now. So why change it?

> If you don't have the technical background to review a certain patch, please
> don't add to the noise.

It is not nice to tell a dumb man how dumb he is. Mommy! I am so sorry 
that I lack the technical background. Please apologize for the noise.

Ciao,
Dscho

```

## Petr Baudis, 2006-07-11 18:36

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <20060711183642.GB13776@pasky.or.cz>
URL: https://gitlist.dev/e/20060711183642.GB13776%40pasky.or.cz
In-Reply-To: <11526131792377-git-send-email-alp@atoker.com>

```
Dear diary, on Tue, Jul 11, 2006 at 12:19:38PM CEST, I got a letter
where Alp Toker <alp@atoker.com> said that...
> diff --git a/Makefile b/Makefile
> index 5b7bac8..cb5a5cc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -538,7 +538,7 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJ
>  builtin-help.o: common-cmds.h
>  
>  $(BUILT_INS): git$X
> -	rm -f $@ && ln git$X $@
> +	ln -sf git$X $@
>  
>  common-cmds.h: Documentation/git-*.txt
>  	./generate-cmdlist.sh > $@+

Doesn't the git$X dependency become pointless at this point?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

```

## Petr Baudis, 2006-07-11 18:48

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <20060711184838.GC13776@pasky.or.cz>
URL: https://gitlist.dev/e/20060711184838.GC13776%40pasky.or.cz
In-Reply-To: <Pine.LNX.4.63.0607111951350.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
  Hi,

Dear diary, on Tue, Jul 11, 2006 at 08:02:53PM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> The consistency is a non-issue, because the Makefile rules Do The Right 
> Thing.

  once in a while, a Git command disappears, it has already happenned
several times (git-rename, git-octopus, git-apply-patch-script, I'm sure
I'd find some more if I looked better; looking into future, I'm not sure
about the further life expectancy of e.g. git-resolve or git-ssh-fetch).

> I happen to run git without installing it, mainly because I like to fiddle 
> around with git. Now, if "git" does not compile for some reason, with 
> symlinks I lose git-diff, git-ls-files, etc.

  If "git" doesn't compile nothing overwrites your previous "git" binary
and things stay working. If "git" did compile but is broken, the
Makefile already rehardlinked the other files anyway so you are still
screwed.

> And -- just maybe -- I _did_ mention a single reason to keep hard links: 
> It works now. So why change it?

  The original patch mentioned why hardlinks are bad, so if you argue
that the raised points are moot, you should give some substance to your
argument.

> > If you don't have the technical background to review a certain patch, please
> > don't add to the noise.
> 
> It is not nice to tell a dumb man how dumb he is. Mommy! I am so sorry 
> that I lack the technical background. Please apologize for the noise.

  Please help to maintain the very friendly nature of this list we
have been enjoying so far.

  Thanks,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

```

## Junio C Hamano, 2006-07-11 19:48

Subject: Re: [PATCH] gitweb: Include a site name in page titles
Message-ID: <7v64i353f3.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v64i353f3.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <46a038f90607110448p40fd8984ke3e15639cf5ecf46@mail.gmail.com>

```
"Martin Langhoff" <martin.langhoff@gmail.com> writes:

>> +# name of your site or organization to appear in page titles
>> +our $site_name = "Untitled";
>
> I generally agree, but as a default, $ENV{SERVER_NAME} should be better.

Sounds like a good suggestion.

```

## Junio C Hamano, 2006-07-11 19:56

Subject: Re: [PATCH] gitweb: Use the git binary in the search path by default
Message-ID: <7vzmff3ogn.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vzmff3ogn.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <11526131791902-git-send-email-alp@atoker.com>

```
Alp Toker <alp@atoker.com> writes:

> Introduce a sensible default for the location of the git binary used by
> gitweb. This means one less option to configure when deploying gitweb if
> git is in the search path.

While I think the part of the change to make things go through
the single "git" wrapper is a good idea, the comment to "our
$GIT" that says "absolute path is optional" makes this change
more like "assume PATH your webserver process uses is sensible",
not "introduce a sensible default".

So I would prefer to do that part like this:

-# location of the git-core binaries
-our $gitbin = "/usr/bin";
+# core git wrapper -- if your webserver runs with a sensible PATH
+# you can just say "git" without using absolute pathname here.
+our $GIT = "/usr/bin/git";

```

## Pavel Roskin, 2006-07-11 22:37

Subject: Re: [PATCH] Typo fix
Message-ID: <1152657439.3700.7.camel@dv>
URL: https://gitlist.dev/e/1152657439.3700.7.camel%40dv
In-Reply-To: <11526131782190-git-send-email-alp@atoker.com>

```
Hello Alp,

On Tue, 2006-07-11 at 11:19 +0100, Alp Toker wrote:
> Signed-off-by: Alp Toker <alp@atoker.com>
> ---
> -wrote you about that phantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.
> +wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.

You are overreacting.  I checked all sources for typos and of course I
saw "phantastic" but I assumed it was intentional.  We don't want the
documentation to be devoid of humor.  Just in case, British spelling
like "behaviour" was also preserved out of respect to the authors.
 
-- 
Regards,
Pavel Roskin

```

## Alex Riesen, 2006-07-12 00:01

Subject: Re: [PATCH] Install built-ins as symlinks
Message-ID: <20060712000103.GA5910@steel.home>
URL: https://gitlist.dev/e/20060712000103.GA5910%40steel.home
In-Reply-To: <20060711184838.GC13776@pasky.or.cz>

```
Petr Baudis, Tue, Jul 11, 2006 20:48:38 +0200:
> > And -- just maybe -- I _did_ mention a single reason to keep hard links: 
> > It works now. So why change it?
> 
>   The original patch mentioned why hardlinks are bad, so if you argue
> that the raised points are moot, you should give some substance to your
> argument.

Windows will add that substance, even if it is a dirty one: symlinks
don't work there properly (cygwin makes that very stupid .lnk file).

```
