git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Pierre Habouzit <madcoder@debian.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.
Date: Sun, 27 Aug 2006 03:52:10 -0700	[thread overview]
Message-ID: <7v64gexxgl.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200608271228.09718.madcoder@debian.org> (Pierre Habouzit's message of "Sun, 27 Aug 2006 12:28:09 +0200")

Pierre Habouzit <madcoder@debian.org> writes:

> 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__

  reply	other threads:[~2006-08-27 10:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 18:52 [PATCH] git-daemon virtual hosting implementation Pierre Habouzit
2006-08-23 20:11 ` Junio C Hamano
2006-08-23 20:56   ` Pierre Habouzit
2006-08-24 20:15     ` Jon Loeliger
2006-08-24 20:35       ` Junio C Hamano
2006-08-24 20:34         ` Jon Loeliger
2006-08-23 23:32   ` [PATCH] git-daemon: more powerful base-path/user-path settings, using formats Pierre Habouzit
2006-08-24  0:17     ` Junio C Hamano
2006-08-24  7:50       ` Pierre Habouzit
2006-08-27  6:12     ` Junio C Hamano
2006-08-27 10:28       ` Pierre Habouzit
2006-08-27 10:52         ` Junio C Hamano [this message]
2006-08-27 11:40           ` Pierre Habouzit
2006-08-27 15:30             ` Jakub Narebski
2006-08-27 16:26               ` Pierre Habouzit
2006-08-27 16:06           ` Randal L. Schwartz
  -- strict thread matches above, loose matches on Subject: below --
2006-08-27 21:49 Jon Loeliger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v64gexxgl.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=madcoder@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).