git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 27, 2006, 10:52 UTC
Message-ID
<7v64gexxgl.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200608271228.09718.madcoder@debian.org>
Pierre Habouzit <madcoder@debian.org> writes:
Show 8 quoted lines
> There is also a second patch that never made it to the list that fixes:
>  * some indentation problems due to a bad vimrc
>  * --default-hostname switch (to handle virtual hosts even with older
>    clients)
>  * possible overflow in the formatting method.
>
> I'll recompute a new patch that superseeds that one, and merge your 
> comments and my never sent patch too.

I have to admit that I kinda liked JDL's simpler one first (and it has been in production use for some time). We'll see.

About vger potentially throwing things away, I use this script (called "taboo.perl") to check my messages before sending them out.

Obviously the taboo-word list itself is not attached here, but the actual script should have a copy of it after the __DATA__ marker.

-- >8 --
#!/usr/bin/perl -w
my $tmpl = '	if (%%PATTERN%%) {
		print "$lineno ${_}matches %%QPATTERN%%\n";
		return;
	}
';
my $stmt = "";
my $in_header = 1;
while (<DATA>) {
	if (/^\$global_taboo_body =/) {
		$in_header = 0;
	}
	next if (/^\043/ || /^\$/ || /^END$/ || /^\s*$/);
	chomp;
	my $p = $_;
	if ($in_header) {
		$p = '/^[-\w_]*:/ && ' . $p;
	}
	my $q = quotemeta($p);
	my $stmt1 = $tmpl;
	$stmt1 =~ s|%%PATTERN%%|$p|g;
	$stmt1 =~ s|%%QPATTERN%%|$q|g;
	$stmt .= $stmt1;
}
close DATA;
$stmt = 'sub check {
	my ($line, $lineno) = @_;
' . $stmt . '
}
';
eval $stmt;
while (<>) {
	check($_, $.);
}
my $how_to_update_this_script = <<'EOF' ;
	( sed -e '/^__DATA__$$/q' taboo.perl && \
	  wget -q -O - http://vger.kernel.org/majordomo-taboos.txt ) \
		>taboo.perl+
	if diff -u taboo.perl taboo.perl+; \
	then \
		rm -f taboo.perl+; \
		echo >&2 No changes.; \
	else \
		mv taboo.perl+ taboo.perl; \
		chmod +x taboo.perl; \
	fi
EOF
__DATA__
Previous: Pierre HabouzitNext: Pierre Habouzit
Message 12 of 16 in “git-daemon virtual hosting implementation.”
  1. git-daemon virtual hosting implementation.Pierre Habouzit, Aug 23, 2006
  2. Junio C HamanoAug 23, 2006
  3. Pierre HabouzitAug 23, 2006
  4. Jon LoeligerAug 24, 2006
  5. Junio C HamanoAug 24, 2006
  6. Jon LoeligerAug 24, 2006
  7. git-daemon: more powerful base-path/user-path settings, using formats.Pierre Habouzit, Aug 23, 2006
  8. Junio C HamanoAug 24, 2006
  9. Pierre HabouzitAug 24, 2006
  10. Junio C HamanoAug 27, 2006
  11. Pierre HabouzitAug 27, 2006
  12. Junio C HamanoAug 27, 2006
  13. Pierre HabouzitAug 27, 2006
  14. Jakub NarebskiAug 27, 2006
  15. Pierre HabouzitAug 27, 2006
  16. Randal L. SchwartzAug 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.