Post merge fixes
authorChristian Thaeter <ct@pipapo.org>
Tue, 22 Jan 2008 17:15:40 +0000 (18:15 +0100)
committerChristian Thaeter <ct@pipapo.org>
Tue, 22 Jan 2008 17:15:40 +0000 (18:15 +0100)
revert .gitignore, please use a build dir!
removed unnecessary whitespaces
reindenting and replacing tabs by spaces
remove webgit_header() from webgit.c

.gitignore
skins/default/css/webgit.css
src/actions.c
src/branch.c
src/log.c
src/object_commit.c
src/webgit.c

index 739781f..2481109 100644 (file)
@@ -1,12 +1,7 @@
 *~
-/minihttpd.log
-/minihttpd.pid
-/minihttpd.pidbk
-/tail.pid
-/tail.pidbk
-Makefile.in
-aclocal.m4
-autom4te.cache
 build
-configure
+autom4te.cache
 scripts
+configure
+Makefile.in
+aclocal.m4
index 4b2b679..e7695e3 100644 (file)
@@ -6,24 +6,24 @@ Default css file with a simple style demonstrating available ids and classes
 
 /* Generic page elements */
 
-html, body { 
+html, body {
   padding: 0;
   margin: 0;
-  font-family: "Liberation Sans", "Bitstream Vera Sans", sans-serif; 
+  font-family: "Liberation Sans", "Bitstream Vera Sans", sans-serif;
   background-color: #ccc;
   height: 100%;
 }
 
-h1 { 
+h1 {
   font-size: 150%;
 }
 
-h2 { 
+h2 {
   font-size: 120%;
 }
 
-a { 
-  
+a {
+
 }
 
 /* ids for specific parts of most pages */
@@ -34,7 +34,7 @@ a {
   width: 100%;
 }
 
-#header { 
+#header {
   background-color: #aaa;
   width: 100%;
 }
@@ -49,7 +49,7 @@ a {
   padding: 5px;
 }
 
-#main-menu { 
+#main-menu {
   background-color: #bbb;
   width: 100%;
   padding: 5px;
@@ -58,7 +58,7 @@ a {
 
 
 
-#timestat { 
+#timestat {
   background-color: #777;
   width: 100%;
   padding: 5px;
@@ -75,11 +75,11 @@ a {
 }
 
 /* ids for specific actions */
-#header-action { 
-  
+#header-action {
+
 }
 
-#summary, #branch-context, #log, #tag, #object-tree, #object-commit { 
+#summary, #branch-context, #log, #tag, #object-tree, #object-commit {
   background-color: #eee;
   width: 100%;
 }
index 322d3c6..db85d7c 100644 (file)
@@ -54,8 +54,8 @@ webgit_header_action (struct webgit_query* query)
 {
   (void) query;
   return html (
-                          "webgit header action"
-                          );
+               "webgit header action"
+               );
 }
 
 static Html
@@ -150,7 +150,7 @@ static Html
 webgit_main_action (struct webgit_query* query)
 {
   return html(
-              html(html_tag("div", html_attr("id", "header-action")), webgit_header_action (query)) , html_nl (),
+              html(html_tag("div", html_attr("id", "header-action")), webgit_header_action (query)), html_nl (),
               html(html_tag("div", html_attr("id", "main-menu")), webgit_main_menu_action (query)), html_nl (),
               html(html_tag("div"), webgit_main_content_action (query)), html_nl ()
               );
@@ -372,7 +372,7 @@ webgit_branch_action (struct webgit_query* query)
   webgit_repoinfo_find_last (repo);
 
   return html(
-                         html(html_tag("div", html_attr("id", "header")), webgit_header_action (query)) , html_nl (),
+              html(html_tag("div", html_attr("id", "header")), webgit_header_action (query)), html_nl (),
               html(html_tag("div"), webgit_branch_menu_action (repo)), html_nl (),
               html(html_tag("div"), webgit_branch_table (repo, query->head, query->count), html_nl ())
               );
@@ -422,8 +422,8 @@ webgit_config_content_action (struct webgit_repo_info* repo)
                                html_attr ("name", "blob"),
                                html_attr ("rows", "40"),
                                html_attr ("cols", "80")
-                               )//,
-                     //html_include_escaped (git_path("config"))
+                               ),
+                     html_include_escaped (git_path("config"))
                      ),
                html (
                      html_tag ("input",
index c29cd55..10e31c0 100644 (file)
@@ -157,5 +157,5 @@ webgit_branch_table (struct webgit_repo_info* repo, const char* head, int count)
 
   for_each_branch_ref (show_branch_ref, &ctx);
 
-  return html (html ( html_tag ("table", html_attr ("id", "branch-context")), ctx.table), ctx.cont);
+  return html (html( html_tag ("table", html_attr ("id", "branch-context")), ctx.table), ctx.cont);
 }
index 27d8759..4638350 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -186,7 +186,7 @@ webgit_log_table (struct webgit_query* query, const char* object, int count, int
       commit->parents = NULL;
     }
 
-  return html (html ( html_tag ("table", html_attr ("id", "log")), table), cont);
+  return html (html( html_tag ("table", html_attr ("id", "log")), table), cont);
 }
 
 
index 91ad51c..780ae79 100644 (file)
@@ -358,7 +358,11 @@ webgit_object_commit_action (struct webgit_repo_info* repo, unsigned char* sha1)
   buf = read_object_with_reference (sha1, "commit", &size, NULL);
 
   return html(
-                                  html(html_tag("div"), webgit_object_commit_menu_action (repo, sha1, buf, size)), html_nl (),
-                                  html(html_tag("div", html_attr ("id", "object-commit")), webgit_object_commit_content_action (repo, sha1, buf, size)), html_nl ()
+              html (html_tag("div"),
+                    webgit_object_commit_menu_action (repo, sha1, buf, size)
+                    ), html_nl (),
+              html (html_tag("div", html_attr ("id", "object-commit")),
+                    webgit_object_commit_content_action (repo, sha1, buf, size)
+                    ), html_nl ()
               );
 }
index 7b480c6..b860e29 100644 (file)
@@ -137,15 +137,6 @@ webgit_mimetype (const char* name)
   return NULL;
 }
 
-static Html
-webgit_header (struct webgit_query* query)
-{
-  (void) query;
-  return html (
-                          html_tag("h1"),
-                          "webgit"
-                          );
-}
 
 int
 main (int argc, char**argv)
@@ -231,35 +222,35 @@ main (int argc, char**argv)
                                              html (
                                                    html (
                                                          html_tag("div",
-                                                                                                                                 html_attr("id", "container")
-                                                                                                                                 ),
-                                                                                                                /* TODO header.inc should be configurable and may not exist
-                                                                                                                 The idea is to have a project header and footer available
-                                                                                                                 as plain html so that someone can install webgit
-                                                                                                                 and quickly add their project logo, menu back to the main
-                                                                                                                 project website and any other notices they may wish to add
-                                                                                                                 */
-                                                                                                                html (
-                                                                                                                          html_tag("div",
-                                                                                                                                               html_attr("id", "header")),
-                                                                                                                          html_include ("/home/cillian/webgit/skins/default/inc/header.inc")
-                                                                                                                          ),
-                                                                                                                content,
-                                                                                                                html(
-                                                                                                                         html_tag("div",
-                                                                                                                                          html_attr("id", "errors")
-                                                                                                                                          ),
-                                                                                                                         error_log
-                                                                                                                         ),
-                                                                                                                // See TODO header.inc above
-                                                                                                                html (
-                                                                                                                          html_tag("div",
-                                                                                                                                               html_attr("id", "footer")),
-                                                                                                                          html_include ("/home/cillian/webgit/skins/default/inc/footer.inc")
-                                                                                                                          )
+                                                                  html_attr("id", "container")
+                                                                  ),
+                                                         /*
+                                                           TODO header.inc should be configurable and may not exist
+                                                            The idea is to have a project header and footer available
+                                                            as plain html so that someone can install webgit
+                                                            and quickly add their project logo, menu back to the main
+                                                            project website and any other notices they may wish to add
+                                                         */
+                                                         html (
+                                                               html_tag("div",
+                                                                        html_attr("id", "header")),
+                                                               html_include ("/home/cillian/webgit/skins/default/inc/header.inc")
+                                                               ),
+                                                         content,
+                                                         html(
+                                                              html_tag("div",
+                                                                       html_attr("id", "errors")
+                                                                       ),
+                                                              error_log
+                                                              ),
+                                                         // See TODO header.inc above
+                                                         html (
+                                                               html_tag("div",
+                                                                        html_attr("id", "footer")),
+                                                               html_include ("/home/cillian/webgit/skins/default/inc/footer.inc")
+                                                               )
 
                                                          )
-                                            
                                                    ),
                                              html_attr("xmlns", "http://www.w3.org/1999/xhtml"),
                                              html_attr("xml:lang", "en"),
@@ -271,12 +262,10 @@ main (int argc, char**argv)
       timestat = clock() - timestat;
       html_list_append (error_log, html (
                                          html_tag("div", html_attr ("id", "timestat")),
-                                                                                html_fmt ("processing took %g secs\n", timestat/(float)CLOCKS_PER_SEC)
-                                         
+                                         html_fmt ("processing took %g secs\n", timestat/(float)CLOCKS_PER_SEC)
                                          )
                         );
 
-
     }
   else
     {
@@ -289,7 +278,7 @@ main (int argc, char**argv)
                                                    query.content_type ?
                                                    query.content_type
                                                    : "application/octet-stream")
-                                  ),
+                                   ),
                   content
                   );
     }