# [PATCH] gitweb: export-ok option

15 messages from 2006-09-16 to 2006-09-17. Participants: Matthias Lederhofer, Jakub Narebski, Junio C Hamano.
Thread: https://gitlist.dev/t/5578

## Matthias Lederhofer, 2006-09-16 19:27

Subject: [PATCH] gitweb: export-ok option
Message-ID: <20060916192750.GA27008@moooo.ath.cx>
URL: https://gitlist.dev/e/20060916192750.GA27008%40moooo.ath.cx

```
Similar to git-daemon checking for git-daemon-export-ok this
introduces an optional check before showing a repository in gitweb.

I also changed the 'No such directory' error message to 'No such
project' because the user visiting my gitweb should not know what
directories I have in the project root directory.

undef $project; is used to prevent displaying the description.
---
Perhaps there should be another option which allows only those
repositories to be shown which are in $projects_list.
---
 Makefile           |    2 ++
 gitweb/gitweb.perl |   18 ++++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 7b3114f..63df24c 100644
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,7 @@ GITWEB_HOMETEXT = indextext.html
 GITWEB_CSS = gitweb.css
 GITWEB_LOGO = git-logo.png
 GITWEB_FAVICON = git-favicon.png
+GITWEB_EXPORT_OK =
 
 export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
 
@@ -637,6 +638,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl
 	    -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
 	    -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
 	    -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
+	    -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
 	    $< >$@+
 	chmod +x $@+
 	mv $@+ $@
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d89f709..3944d13 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -54,6 +54,9 @@ our $favicon = "++GITWEB_FAVICON++";
 # source of projects list
 our $projects_list = "++GITWEB_LIST++";
 
+# show repository only if this file exists
+our $export_ok = "++GITWEB_EXPORT_OK++";
+
 # list of git base URLs used for URL to where fetch project from,
 # i.e. full URL is "$git_base_url/$project"
 our @git_base_url_list = ("++GITWEB_BASE_URL++");
@@ -181,12 +184,13 @@ if (defined $project) {
 }
 if (defined $project) {
 	if (!validate_input($project)) {
+		undef $project;
 		die_error(undef, "Invalid project parameter");
 	}
-	if (!(-d "$projectroot/$project")) {
-		die_error(undef, "No such directory");
-	}
-	if (!(-e "$projectroot/$project/HEAD")) {
+	if (!(-d "$projectroot/$project") ||
+	    !(-e "$projectroot/$project/HEAD") ||
+	    ($export_ok && !(-e "$projectroot/$project/$export_ok"))) {
+		undef $project;
 		die_error(undef, "No such project");
 	}
 	$git_dir = "$projectroot/$project";
@@ -694,7 +698,8 @@ sub git_get_projects_list {
 		my $dir = $projects_list;
 		opendir my ($dh), $dir or return undef;
 		while (my $dir = readdir($dh)) {
-			if (-e "$projectroot/$dir/HEAD") {
+			if (-e "$projectroot/$dir/HEAD" && (!$export_ok ||
+			    -e "$projectroot/$dir/$export_ok")) {
 				my $pr = {
 					path => $dir,
 				};
@@ -716,7 +721,8 @@ sub git_get_projects_list {
 			if (!defined $path) {
 				next;
 			}
-			if (-e "$projectroot/$path/HEAD") {
+			if (-e "$projectroot/$path/HEAD" && (!$export_ok ||
+			    -e "$projectroot/$path/$export_ok")) {
 				my $pr = {
 					path => $path,
 					owner => decode("utf8", $owner, Encode::FB_DEFAULT),
-- 
1.4.2.g0ea2

```

## Jakub Narebski, 2006-09-16 19:40

Subject: Re: [PATCH] gitweb: export-ok option
Message-ID: <eehjtn$ipm$1@sea.gmane.org>
URL: https://gitlist.dev/e/eehjtn%24ipm%241%40sea.gmane.org
In-Reply-To: <20060916192750.GA27008@moooo.ath.cx>

```
Matthias Lederhofer wrote:

> Perhaps there should be another option which allows only those
> repositories to be shown which are in $projects_list.

If $projects_list is a file (and not directory), only repositories
specified there are shown.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Jakub Narebski, 2006-09-16 19:44

Subject: Re: [PATCH] gitweb: export-ok option
Message-ID: <eehk5p$ipm$2@sea.gmane.org>
URL: https://gitlist.dev/e/eehk5p%24ipm%242%40sea.gmane.org
In-Reply-To: <20060916192750.GA27008@moooo.ath.cx>

```
Matthias Lederhofer wrote:

> Similar to git-daemon checking for git-daemon-export-ok this
> introduces an optional check before showing a repository in gitweb.
> 
> I also changed the 'No such directory' error message to 'No such
> project' because the user visiting my gitweb should not know what
> directories I have in the project root directory.
> 
> undef $project; is used to prevent displaying the description.
> ---
> Perhaps there should be another option which allows only those
> repositories to be shown which are in $projects_list.

I don't know what this is for (well, except replacing 'No such directory'
error message by 'No such project'). If you want only some of repositories
to be present in gitweb, you simply use $projects_list _file_ (e.g. using
new "project_index" action to generate it) and edit it to contain only the
repositories you want to be shown in gitweb.

Unless of course the person who hosts gitweb, and the person who owns
repository are uncommunicado, and you want the power of deciding if
repository is present in gitweb or not to be placed in the hands of
repository owner. Still, gitweb must be configured for this.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Matthias Lederhofer, 2006-09-16 20:33

Subject: Re: [PATCH] gitweb: export-ok option
Message-ID: <20060916203333.GA29036@moooo.ath.cx>
URL: https://gitlist.dev/e/20060916203333.GA29036%40moooo.ath.cx
In-Reply-To: <eehjtn$ipm$1@sea.gmane.org>

```
Jakub Narebski <jnareb@gmail.com> wrote:
> Matthias Lederhofer wrote:
> 
> > Perhaps there should be another option which allows only those
> > repositories to be shown which are in $projects_list.
> 
> If $projects_list is a file (and not directory), only repositories
> specified there are shown.

The main problem is not the list of projects. Every repository below
$project_root can be viewed using ?p=path/to/repostory.

```

## Junio C Hamano, 2006-09-16 20:37

Subject: Re: [PATCH] gitweb: export-ok option
Message-ID: <7vy7sj8s4g.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vy7sj8s4g.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <eehjtn$ipm$1@sea.gmane.org>

```
Jakub Narebski <jnareb@gmail.com> writes:

> Matthias Lederhofer wrote:
>
>> Perhaps there should be another option which allows only those
>> repositories to be shown which are in $projects_list.
>
> If $projects_list is a file (and not directory), only repositories
> specified there are shown.

If you can _guess_ project's name, you can go directly to
git_summary with it, and the page (or links that the page leads
to) does not check $projects_list at all, no?

I think Matthias's patch addresses that issue.

```

## Matthias Lederhofer, 2006-09-16 21:43

Subject: [PATCH] gitweb: option 'strict export'
Message-ID: <20060916214323.GA21637@moooo.ath.cx>
URL: https://gitlist.dev/e/20060916214323.GA21637%40moooo.ath.cx
In-Reply-To: <20060916192750.GA27008@moooo.ath.cx>

```
With this option enabled gitweb will only give access to repositories
which are also shown on the overview page.
---
Matthias Lederhofer <matled@gmx.net> wrote:
> Perhaps there should be another option which allows only those
> repositories to be shown which are in $projects_list.
Here it is.  This option is probably the one more likely to be used.
It disallows access to repositories (using ?p=path/to/repository) that
are not on the projects-list-page.
---
 Makefile           |    2 ++
 gitweb/gitweb.perl |   12 +++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 63df24c..0e17d4c 100644
--- a/Makefile
+++ b/Makefile
@@ -133,6 +133,7 @@ GITWEB_CSS = gitweb.css
 GITWEB_LOGO = git-logo.png
 GITWEB_FAVICON = git-favicon.png
 GITWEB_EXPORT_OK =
+GITWEB_STRICT_EXPORT =
 
 export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
 
@@ -639,6 +640,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl
 	    -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
 	    -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
 	    -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
+	    -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
 	    $< >$@+
 	chmod +x $@+
 	mv $@+ $@
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3944d13..976f7ec 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -57,6 +57,9 @@ our $projects_list = "++GITWEB_LIST++";
 # show repository only if this file exists
 our $export_ok = "++GITWEB_EXPORT_OK++";
 
+# only allow viewing of repositories also shown on the overview page
+our $strict_export = "++GITWEB_STRICT_EXPORT++";
+
 # list of git base URLs used for URL to where fetch project from,
 # i.e. full URL is "$git_base_url/$project"
 our @git_base_url_list = ("++GITWEB_BASE_URL++");
@@ -189,7 +192,8 @@ if (defined $project) {
 	}
 	if (!(-d "$projectroot/$project") ||
 	    !(-e "$projectroot/$project/HEAD") ||
-	    ($export_ok && !(-e "$projectroot/$project/$export_ok"))) {
+	    ($export_ok && !(-e "$projectroot/$project/$export_ok")) ||
+	    ($strict_export && !project_in_list($project))) {
 		undef $project;
 		die_error(undef, "No such project");
 	}
@@ -384,6 +388,12 @@ sub untabify {
 	return $line;
 }
 
+sub project_in_list {
+	my $project = shift;
+	my @list = git_get_projects_list();
+	return(@list && scalar(grep { $_->{'path'} eq $project } @list) != 0);
+}
+
 ## ----------------------------------------------------------------------
 ## HTML aware string manipulation
 
-- 
1.4.2.g0ea2

```

## Matthias Lederhofer, 2006-09-16 22:30

Subject: [PATCH/current master] gitweb: do not use 'No such directory' error message
Message-ID: <20060916223027.GA32679@moooo.ath.cx>
URL: https://gitlist.dev/e/20060916223027.GA32679%40moooo.ath.cx
In-Reply-To: <20060916192750.GA27008@moooo.ath.cx>

```
undef $project; to prevent a file named description to be read.
---
Sorry, I patched an old version.  Here is the patch for the current
master/next.
---
 gitweb/gitweb.perl |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a81c8d4..07ea1ea 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -203,13 +203,10 @@ if (defined $project) {
 	$project = undef unless $project;
 }
 if (defined $project) {
-	if (!validate_input($project)) {
-		die_error(undef, "Invalid project parameter");
-	}
-	if (!(-d "$projectroot/$project")) {
-		die_error(undef, "No such directory");
-	}
-	if (!(-e "$projectroot/$project/HEAD")) {
+	if (!validate_input($project) ||
+	    !(-d "$projectroot/$project") ||
+	    !(-e "$projectroot/$project/HEAD")) {
+		undef $project;
 		die_error(undef, "No such project");
 	}
 	$git_dir = "$projectroot/$project";
-- 
1.4.2.g0ea2

```

## Matthias Lederhofer, 2006-09-16 22:31

Subject: [PATCH] gitweb: export options
Message-ID: <20060916223101.GB32679@moooo.ath.cx>
URL: https://gitlist.dev/e/20060916223101.GB32679%40moooo.ath.cx
In-Reply-To: <20060916223027.GA32679@moooo.ath.cx>

```
$export_ok: If this variable evaluates to true it is checked
if a file with this name exists in the repository.  If it
does not exist the repository cannot be viewed from gitweb.
(Similar to git-daemon-export-ok for git-daemon).

$strict_export: If this variable evaluates to true only
repositories listed on the project-list-page of gitweb can
be accessed.
---
 Makefile           |    4 ++++
 gitweb/gitweb.perl |   23 ++++++++++++++++++++---
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 7b3114f..b9938ac 100644
--- a/Makefile
+++ b/Makefile
@@ -126,6 +126,8 @@ GITWEB_CONFIG = gitweb_config.perl
 GITWEB_HOME_LINK_STR = projects
 GITWEB_SITENAME =
 GITWEB_PROJECTROOT = /pub/git
+GITWEB_EXPORT_OK =
+GITWEB_STRICT_EXPORT =
 GITWEB_BASE_URL =
 GITWEB_LIST =
 GITWEB_HOMETEXT = indextext.html
@@ -631,6 +633,8 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl
 	    -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \
 	    -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
 	    -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
+	    -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
+	    -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
 	    -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \
 	    -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
 	    -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 07ea1ea..2a63c17 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -54,6 +54,13 @@ our $favicon = "++GITWEB_FAVICON++";
 # source of projects list
 our $projects_list = "++GITWEB_LIST++";
 
+# show repository only if this file exists
+# (only effective if this variable evaluates to true)
+our $export_ok = "++GITWEB_EXPORT_OK++";
+
+# only allow viewing of repositories also shown on the overview page
+our $strict_export = "++GITWEB_STRICT_EXPORT++";
+
 # list of git base URLs used for URL to where fetch project from,
 # i.e. full URL is "$git_base_url/$project"
 our @git_base_url_list = ("++GITWEB_BASE_URL++");
@@ -205,7 +212,9 @@ if (defined $project) {
 if (defined $project) {
 	if (!validate_input($project) ||
 	    !(-d "$projectroot/$project") ||
-	    !(-e "$projectroot/$project/HEAD")) {
+	    !(-e "$projectroot/$project/HEAD") ||
+	    ($export_ok && !(-e "$projectroot/$project/$export_ok")) ||
+	    ($strict_export && !project_in_list($project))) {
 		undef $project;
 		die_error(undef, "No such project");
 	}
@@ -402,6 +411,12 @@ sub untabify {
 	return $line;
 }
 
+sub project_in_list {
+	my $project = shift;
+	my @list = git_get_projects_list();
+	return @list && scalar(grep { $_->{'path'} eq $project } @list);
+}
+
 ## ----------------------------------------------------------------------
 ## HTML aware string manipulation
 
@@ -714,7 +729,8 @@ sub git_get_projects_list {
 
 				my $subdir = substr($File::Find::name, $pfxlen + 1);
 				# we check related file in $projectroot
-				if (-e "$projectroot/$subdir/HEAD") {
+				if (-e "$projectroot/$subdir/HEAD" && (!$export_ok ||
+				    -e "$projectroot/$subdir/$export_ok")) {
 					push @list, { path => $subdir };
 					$File::Find::prune = 1;
 				}
@@ -735,7 +751,8 @@ sub git_get_projects_list {
 			if (!defined $path) {
 				next;
 			}
-			if (-e "$projectroot/$path/HEAD") {
+			if (-e "$projectroot/$path/HEAD" && (!$export_ok ||
+			    -e "$projectroot/$path/$export_ok")) {
 				my $pr = {
 					path => $path,
 					owner => decode("utf8", $owner, Encode::FB_DEFAULT),
-- 
1.4.2.g0ea2

```

## Junio C Hamano, 2006-09-17 08:53

Subject: Re: [PATCH] gitweb: export options
Message-ID: <7v64fm7u2q.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v64fm7u2q.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060916223101.GB32679@moooo.ath.cx>

```
Matthias Lederhofer <matled@gmx.net> writes:

> $export_ok: If this variable evaluates to true it is checked
> if a file with this name exists in the repository.  If it
> does not exist the repository cannot be viewed from gitweb.
> (Similar to git-daemon-export-ok for git-daemon).
>
> $strict_export: If this variable evaluates to true only
> repositories listed on the project-list-page of gitweb can
> be accessed.

Is this replacement for your earlier two patches?

        [PATCH] gitweb: export-ok option
        [PATCH] gitweb: option 'strict export'

What's the difference between this and the previous two?

I am asking this question because I am lazy and do not want to
review two sets of similar patches ;-).

```

## Matthias Lederhofer, 2006-09-17 09:07

Subject: Re: [PATCH] gitweb: export options
Message-ID: <20060917090710.GA18153@moooo.ath.cx>
URL: https://gitlist.dev/e/20060917090710.GA18153%40moooo.ath.cx
In-Reply-To: <7v64fm7u2q.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano <junkio@cox.net> wrote:
> Matthias Lederhofer <matled@gmx.net> writes:
> Is this replacement for your earlier two patches?
Yes, it is, they did not apply on the current master. (I fetched the
new heads, had a short look at the log but forgot to update my working
heads :) ).

>         [PATCH] gitweb: export-ok option
>         [PATCH] gitweb: option 'strict export'
> 
> What's the difference between this and the previous two?
Now I decided to split it in another way: first remove the
no-such-directory error and then implement the two new features. The
patches should be equivalent to those before.

```

## Junio C Hamano, 2006-09-17 10:34

Subject: Re: [PATCH] gitweb: export options
Message-ID: <7vodte4w9w.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vodte4w9w.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060917090710.GA18153@moooo.ath.cx>

```
Matthias Lederhofer <matled@gmx.net> writes:

> Junio C Hamano <junkio@cox.net> wrote:
>> Matthias Lederhofer <matled@gmx.net> writes:
>> Is this replacement for your earlier two patches?
> Yes, it is, they did not apply on the current master. (I fetched the
> new heads, had a short look at the log but forgot to update my working
> heads :) ).
>
>>         [PATCH] gitweb: export-ok option
>>         [PATCH] gitweb: option 'strict export'
>> 
>> What's the difference between this and the previous two?
>
> Now I decided to split it in another way: first remove the
> no-such-directory error and then implement the two new features. The
> patches should be equivalent to those before.

I see.

The PATHINFO stuff Martin Waitz did mucks with $project somewhat
later than this part of the patch, possibly bypassing your
checks.  Could you check what's in 'master' to see if it is
reasonable and if not fix it up please?

```

## Matthias Lederhofer, 2006-09-17 13:29

Subject: [PATCH] gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
Message-ID: <20060917132948.GA976@moooo.ath.cx>
URL: https://gitlist.dev/e/20060917132948.GA976%40moooo.ath.cx
In-Reply-To: <7vodte4w9w.fsf@assigned-by-dhcp.cox.net>

```
---
Junio C Hamano <junkio@cox.net> wrote:
> Matthias Lederhofer <matled@gmx.net> writes:
> The PATHINFO stuff Martin Waitz did mucks with $project somewhat
> later than this part of the patch, possibly bypassing your
> checks.  Could you check what's in 'master' to see if it is
> reasonable and if not fix it up please?
This patch replaces the other two warning fixes by Jakub and me.  I've
put the whole thing in a sub-routine to keep the indentation level
low.
---
 gitweb/gitweb.perl |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 497129a..0fb8638 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -189,9 +189,6 @@ do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
 # version of the core git binary
 our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
 
-# path to the current git repository
-our $git_dir;
-
 $projects_list ||= $projectroot;
 
 # ======================================================================
@@ -273,30 +270,41 @@ if (defined $searchtext) {
 }
 
 # now read PATH_INFO and use it as alternative to parameters
-our $path_info = $ENV{"PATH_INFO"};
-$path_info =~ s|^/||;
-$path_info =~ s|/$||;
-if (validate_input($path_info) && !defined $project) {
+sub evaluate_path_info {
+	return if defined $project;
+	my $path_info = $ENV{"PATH_INFO"};
+	return if !$path_info;
+	$path_info =~ s,(^/|/$),,gs;
+	$path_info = validate_input($path_info);
+	return if !$path_info;
 	$project = $path_info;
 	while ($project && !-e "$projectroot/$project/HEAD") {
 		$project =~ s,/*[^/]*$,,;
 	}
-	if (defined $project) {
-		$project = undef unless $project;
+	if (!$project ||
+	    ($export_ok && !-e "$projectroot/$project/$export_ok") ||
+	    ($strict_export && !project_in_list($project))) {
+		undef $project;
+		return;
 	}
+	# do not change any parameters if an action is given using the query string
+	return if $action;
 	if ($path_info =~ m,^$project/([^/]+)/(.+)$,) {
 		# we got "project.git/branch/filename"
 		$action    ||= "blob_plain";
-		$hash_base ||= $1;
-		$file_name ||= $2;
+		$hash_base ||= validate_input($1);
+		$file_name ||= validate_input($2);
 	} elsif ($path_info =~ m,^$project/([^/]+)$,) {
 		# we got "project.git/branch"
 		$action ||= "shortlog";
-		$hash   ||= $1;
+		$hash   ||= validate_input($1);
 	}
 }
+evaluate_path_info();
 
-$git_dir = "$projectroot/$project";
+# path to the current git repository
+our $git_dir;
+$git_dir = "$projectroot/$project" if $project;
 
 # dispatch
 my %actions = (
-- 
1.4.2.1.ge767

```

## Junio C Hamano, 2006-09-17 22:06

Subject: Re: [PATCH] gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
Message-ID: <7v4pv62lni.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v4pv62lni.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060917132948.GA976@moooo.ath.cx>

```
Matthias Lederhofer <matled@gmx.net> writes:

> This patch replaces the other two warning fixes by Jakub and me.  I've
> put the whole thing in a sub-routine to keep the indentation level
> low.

Looks much cleaner with this extra sub.

This does not seem have the "colon as a cue that the URL is also
talking about a branch", Jakub's summary of the discussion
between you two on #git channel.  I think that proposal makes
sense as well.

```

## Jakub Narebski, 2006-09-17 22:45

Subject: Re: [PATCH] gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
Message-ID: <eekj5b$rlc$1@sea.gmane.org>
URL: https://gitlist.dev/e/eekj5b%24rlc%241%40sea.gmane.org
In-Reply-To: <7v4pv62lni.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano wrote:

> Matthias Lederhofer <matled@gmx.net> writes:
> 
>> This patch replaces the other two warning fixes by Jakub and me.  I've
>> put the whole thing in a sub-routine to keep the indentation level
>> low.
> 
> Looks much cleaner with this extra sub.
> 
> This does not seem have the "colon as a cue that the URL is also
> talking about a branch", Jakub's summary of the discussion
> between you two on #git channel.  I think that proposal makes
> sense as well.

Well, that is because this patch _predates_ the discussion 
(and proposal/conclusions). 

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Junio C Hamano, 2006-09-17 23:10

Subject: Re: [PATCH] gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
Message-ID: <7vzmcy143n.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vzmcy143n.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <eekj5b$rlc$1@sea.gmane.org>

```
Jakub Narebski <jnareb@gmail.com> writes:

> Junio C Hamano wrote:
>
>> Matthias Lederhofer <matled@gmx.net> writes:
>> 
>>> This patch replaces the other two warning fixes by Jakub and me.  I've
>>> put the whole thing in a sub-routine to keep the indentation level
>>> low.
>> 
>> Looks much cleaner with this extra sub.
>> 
>> This does not seem have the "colon as a cue that the URL is also
>> talking about a branch", Jakub's summary of the discussion
>> between you two on #git channel.  I think that proposal makes
>> sense as well.
>
> Well, that is because this patch _predates_ the discussion 
> (and proposal/conclusions). 

Yup, I know, I was not complaining.

I was saying that I do not oppose to a follow-up patch to add
that "colon" stuff.

```
