From 422b4a0e03658d0933a7abc149f175735ea9c4b5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 4 Oct 2006 21:37:15 -0700 Subject: [PATCH 1/2] pack-refs: call fflush before fsync. Signed-off-by: Junio C Hamano --- builtin-pack-refs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c index ede47434e3..23d0d0720e 100644 --- a/builtin-pack-refs.c +++ b/builtin-pack-refs.c @@ -89,6 +89,7 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix) die("unable to create ref-pack file structure (%s)", strerror(errno)); for_each_ref(handle_one_ref, &cbdata); + fflush(cbdata.refs_file); fsync(fd); fclose(cbdata.refs_file); if (commit_lock_file(&packed) < 0) From a9455919064ab316b7852d0006c1bd771b727f2e Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Tue, 3 Oct 2006 20:07:43 +0200 Subject: [PATCH 2/2] gitweb: warn if feature cannot be overridden. If the administrator configures pathinfo to be overrideable by the local repository a warning is shown. Signed-off-by: Martin Waitz Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 10e803a97f..0ff6f7c1e4 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -116,6 +116,10 @@ sub gitweb_check_feature { $feature{$name}{'override'}, @{$feature{$name}{'default'}}); if (!$override) { return @defaults; } + if (!defined $sub) { + warn "feature $name is not overrideable"; + return @defaults; + } return $sub->(@defaults); }