* [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
2010-09-02 23:52 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
@ 2010-09-02 23:54 ` Jonathan Nieder
2010-09-03 17:23 ` Junio C Hamano
2010-09-02 23:55 ` [PATCH 2/4] gitweb: skip logo in atom feed when there is none Jonathan Nieder
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-02 23:54 UTC (permalink / raw)
To: Eric Wong; +Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
The configuration in /etc/gitweb.conf might specify any old
layout; in particular, it is likely not to be identical to that
which git instaweb sets up. Noticed by Uwe Kleine-König.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
git-instaweb.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index f608014..6279f4d 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -375,7 +375,8 @@ script='
s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
-s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
+s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
+s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
gitweb_cgi () {
cat > "$1.tmp" <<\EOFGITWEB
--
1.7.2.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
2010-09-02 23:54 ` [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM Jonathan Nieder
@ 2010-09-03 17:23 ` Junio C Hamano
2010-09-03 18:20 ` Jonathan Nieder
2010-09-03 23:58 ` Jonathan Nieder
0 siblings, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2010-09-03 17:23 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Eric Wong, Uwe Kleine-König, git, Jakub Narebski,
Pavan Kumar Sunkara
Jonathan Nieder <jrnieder@gmail.com> writes:
> The configuration in /etc/gitweb.conf might specify any old
> layout; in particular, it is likely not to be identical to that
> which git instaweb sets up. Noticed by Uwe Kleine-König.
I am not sure if this is a reasonable change by reading the above. In
some cases, the file may stale, but in other cases, it may specify what
the site administrator wants its users to be using, no?
>
> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Eric Wong <normalperson@yhbt.net>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> git-instaweb.sh | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/git-instaweb.sh b/git-instaweb.sh
> index f608014..6279f4d 100755
> --- a/git-instaweb.sh
> +++ b/git-instaweb.sh
> @@ -375,7 +375,8 @@ script='
> s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
> s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
> s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
> -s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
> +s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
> +s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
Perhaps moving the last ' to its own line would help maintaining the
script in the longer term?
>
> gitweb_cgi () {
> cat > "$1.tmp" <<\EOFGITWEB
> --
> 1.7.2.2
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
2010-09-03 17:23 ` Junio C Hamano
@ 2010-09-03 18:20 ` Jonathan Nieder
2010-09-03 23:58 ` Jonathan Nieder
1 sibling, 0 replies; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-03 18:20 UTC (permalink / raw)
To: Junio C Hamano
Cc: Eric Wong, Uwe Kleine-König, git, Jakub Narebski,
Pavan Kumar Sunkara
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> The configuration in /etc/gitweb.conf might specify any old
>> layout; in particular, it is likely not to be identical to that
>> which git instaweb sets up. Noticed by Uwe Kleine-König.
>
> I am not sure if this is a reasonable change by reading the above. In
> some cases, the file may stale, but in other cases, it may specify what
> the site administrator wants its users to be using, no?
Yes, I should have mentioned this.
By analogy with .gitconfig, one might want "git instaweb" to check
GITWEB_CONFIG_LOCAL, GITWEB_CONFIG_GLOBAL, and GITWEB_CONFIG_SYSTEM in
that order, taking values from all three. A GITWEB_CONFIG envvar
could override them all.
But stepping back a moment, what would this accomplish? The gitweb
configuration specifies
- what git version to use;
- site branding;
- what directory projects are relative to (*);
- how deep to search for projects;
- where the list of projects is (*);
- how to demonstrate project consent to be shown (*);
- whether to be a stickler about hiding secrets;
- where gitweb.css, git-logo.png, git-favicon.png, and gitweb.js are (*);
- base URI for relative paths used above (*);
- what extra features (e.g. "snapshot") to enable;
- MIME types, diff options, etc.
The items marked with a (*) are, in the regime used by git 1.7.1,
specific to the "git instaweb" instance, since it is all about showing
the current git repo and provides its own copies of gitweb.cgi instead
of relying on copies in /usr/share/gitweb.
The items not marked with (*) might indeed benefit from some global
site defaults. But unfortunately, that is already not what
/etc/gitweb.conf is: it is rather used as a unit as a fallback when a
separate gitweb_config.perl is not present.
In git 1.7.2 and later, "git instaweb" provides the gitweb_config.perl
and this discussion becomes academic.
>> -s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
>> +s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
>> +s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
>
> Perhaps moving the last ' to its own line would help maintaining the
> script in the longer term?
Good idea; thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
2010-09-03 17:23 ` Junio C Hamano
2010-09-03 18:20 ` Jonathan Nieder
@ 2010-09-03 23:58 ` Jonathan Nieder
2010-09-04 1:36 ` Junio C Hamano
1 sibling, 1 reply; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-03 23:58 UTC (permalink / raw)
To: Junio C Hamano
Cc: Eric Wong, Uwe Kleine-König, git, Jakub Narebski,
Pavan Kumar Sunkara
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> The configuration in /etc/gitweb.conf might specify any old
>> layout; in particular, it is likely not to be identical to that
>> which git instaweb sets up. Noticed by Uwe Kleine-König.
>
> I am not sure if this is a reasonable change by reading the above. In
> some cases, the file may stale, but in other cases
Ah, I missed your point here. By "any old layout", I meant "an
arbitrary layout"[1]. Sorry for the lack of clarity.
Jonathan
[1] http://www.google.com/search?q=any+old
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM
2010-09-03 23:58 ` Jonathan Nieder
@ 2010-09-04 1:36 ` Junio C Hamano
2010-09-04 2:19 ` Jonathan Nieder
0 siblings, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2010-09-04 1:36 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Eric Wong, Uwe Kleine-König, git, Jakub Narebski,
Pavan Kumar Sunkara
Jonathan Nieder <jrnieder@gmail.com> writes:
> Junio C Hamano wrote:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>>> The configuration in /etc/gitweb.conf might specify any old
>>> layout; in particular, it is likely not to be identical to that
>>> which git instaweb sets up. Noticed by Uwe Kleine-König.
>> ...
> Ah, I missed your point here. By "any old layout", I meant "an
> arbitrary layout"[1]. Sorry for the lack of clarity.
Ah, you mean "instaweb wants to use a specific layout but whatever is
specified in /etc/gitweb.conf will interfere with it"?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/4] gitweb: skip logo in atom feed when there is none
2010-09-02 23:52 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
2010-09-02 23:54 ` [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM Jonathan Nieder
@ 2010-09-02 23:55 ` Jonathan Nieder
2010-09-02 23:56 ` [PATCH 3/4] gitweb: make logo optional Jonathan Nieder
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-02 23:55 UTC (permalink / raw)
To: Eric Wong; +Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
With v1.5.0-rc0~169 (gitweb: Fix Atom feed <logo>: it is $logo,
not $logo_url, 2006-12-04), the logo URI to be written to Atom
feeds was corrected but the case of no logo forgotten.
Cc: Jakub Narebski <jnareb@gmail.com>
Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Theoretical, untested.
gitweb/gitweb.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a97ce03..cc20e74 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6630,7 +6630,7 @@ XML
if (defined $favicon) {
print "<icon>" . esc_url($favicon) . "</icon>\n";
}
- if (defined $logo_url) {
+ if (defined $logo) {
# not twice as wide as tall: 72 x 27 pixels
print "<logo>" . esc_url($logo) . "</logo>\n";
}
--
1.7.2.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] gitweb: make logo optional
2010-09-02 23:52 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
2010-09-02 23:54 ` [PATCH 1/4] instaweb: ignore GITWEB_CONFIG_SYSTEM Jonathan Nieder
2010-09-02 23:55 ` [PATCH 2/4] gitweb: skip logo in atom feed when there is none Jonathan Nieder
@ 2010-09-02 23:56 ` Jonathan Nieder
2010-09-02 23:57 ` [PATCH 4/4] instaweb: disable logo and favicon by default Jonathan Nieder
2010-09-03 1:09 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Eric Wong
4 siblings, 0 replies; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-02 23:56 UTC (permalink / raw)
To: Eric Wong; +Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
Some sites may not want to have a logo at all. In particular,
git instaweb can benefit from this.
Cc: Jakub Narebski <jnareb@gmail.com>
Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
gitweb/gitweb.perl | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index cc20e74..9a72562 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3269,10 +3269,12 @@ EOF
insert_file($site_header);
}
- print "<div class=\"page_header\">\n" .
- $cgi->a({-href => esc_url($logo_url),
- -title => $logo_label},
- qq(<img src="$logo" width="72" height="27" alt="git" class="logo"/>));
+ print "<div class=\"page_header\">\n";
+ if (defined $logo) {
+ print $cgi->a({-href => esc_url($logo_url),
+ -title => $logo_label},
+ qq(<img src="$logo" width="72" height="27" alt="git" class="logo"/>));
+ }
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
if (defined $project) {
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
--
1.7.2.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] instaweb: disable logo and favicon by default
2010-09-02 23:52 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
` (2 preceding siblings ...)
2010-09-02 23:56 ` [PATCH 3/4] gitweb: make logo optional Jonathan Nieder
@ 2010-09-02 23:57 ` Jonathan Nieder
2010-09-03 2:19 ` [PATCH v2 " Jonathan Nieder
2010-09-03 1:09 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Eric Wong
4 siblings, 1 reply; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-02 23:57 UTC (permalink / raw)
To: Eric Wong; +Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
Avoid 404 errors due to the missing git logo and favicon.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Eric Wong <normalperson@yhbt.net>
Cc: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Thanks for reading.
git-instaweb.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 6279f4d..1128b31 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -376,7 +376,9 @@ s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
-s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
+s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;
+s#(my|our) \$favicon =.*#$1 \$favicon = undef;#;'
+s#(my|our) \$logo =.*#$1 \$logo = undef;#;'
gitweb_cgi () {
cat > "$1.tmp" <<\EOFGITWEB
--
1.7.2.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/4] instaweb: disable logo and favicon by default
2010-09-02 23:57 ` [PATCH 4/4] instaweb: disable logo and favicon by default Jonathan Nieder
@ 2010-09-03 2:19 ` Jonathan Nieder
0 siblings, 0 replies; 14+ messages in thread
From: Jonathan Nieder @ 2010-09-03 2:19 UTC (permalink / raw)
To: Eric Wong; +Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
Avoid 404 errors due to the missing git logo and favicon.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Eric Wong <normalperson@yhbt.net>
Cc: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Jonathan Nieder wrote:
> --- a/git-instaweb.sh
> +++ b/git-instaweb.sh
> @@ -376,7 +376,9 @@ s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
> s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
> s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
> s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
> -s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
> +s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;
> +s#(my|our) \$favicon =.*#$1 \$favicon = undef;#;'
> +s#(my|our) \$logo =.*#$1 \$logo = undef;#;'
Stray apostrophe; sorry about that. Here's a replacement.
git-instaweb.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 6279f4d..0725596 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -376,7 +376,9 @@ s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
-s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;'
+s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;
+s#(my|our) \$favicon =.*#$1 \$favicon = undef;#;
+s#(my|our) \$logo =.*#$1 \$logo = undef;#;'
gitweb_cgi () {
cat > "$1.tmp" <<\EOFGITWEB
--
1.7.2.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze
2010-09-02 23:52 ` [PATCH/RFC maint-1.7.1 0/4] instaweb 1.7.1 fixes for Debian squeeze Jonathan Nieder
` (3 preceding siblings ...)
2010-09-02 23:57 ` [PATCH 4/4] instaweb: disable logo and favicon by default Jonathan Nieder
@ 2010-09-03 1:09 ` Eric Wong
4 siblings, 0 replies; 14+ messages in thread
From: Eric Wong @ 2010-09-03 1:09 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Uwe Kleine-König, git, Jakub Narebski, Pavan Kumar Sunkara
Jonathan Nieder <jrnieder@gmail.com> wrote:
> Eric Wong wrote:
> >> Uwe Kleine-König wrote:
> >>> when I start git instaweb on a git repository, I get a crippled view
> >>> (no style sheets, no images) that doesn't include the current project.
> [...]
> > The stylesheet is important and should be fixed. I don't care about the
> > logo and favicon (warning: I've never been a fan of logos/icons,
> > needless noise IMHO), but if you're willing to help maintain it then
> > it's fine by me.
>
> Thanks, Eric; that makes sense. How about this?
Untested, but everything looks reasonable to me, thanks!
--
Eric Wong
^ permalink raw reply [flat|nested] 14+ messages in thread