blame css
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
diff --git a/.gitignore b/.gitignore
index 0789537..eecd321 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
**/obj
-libexec/**
-gotweb/**
diff --git a/Makefile.inc b/Makefile.inc
index 36e91d3..92bb0fe 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1,5 +1,5 @@
CPPFLAGS += -DGOT_LIBEXECDIR=${LIBEXECDIR} -DGOT_VERSION=${GOT_VERSION}
-#CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable
+CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable
#CFLAGS += -DGOT_PACK_NO_MMAP
#CFLAGS += -DGOT_NO_OBJ_CACHE
#CFLAGS += -DGOT_OBJ_CACHE_DEBUG
diff --git a/gotweb/files/htdocs/gotweb/gotweb.css b/gotweb/files/htdocs/gotweb/gotweb.css
index 3886de7..b78b527 100644
--- a/gotweb/files/htdocs/gotweb/gotweb.css
+++ b/gotweb/files/htdocs/gotweb/gotweb.css
@@ -577,19 +577,37 @@ body {
padding: 20px;
font-family: monospace;
white-space: pre;
+ overflow: auto;
}
#blame_wrapper {
clear: left;
float: left;
width: 100%;
}
-#blame_id {
+#blame_number {
float: left;
- padding: 2px;
+ width: 3em;
+ overflow: hidden;
}
-#blame {
- float:left ;
- padding: 2px;
+#blame_hash {
+ float: left;
+ width: 6em;
+ overflow: auto;
+}
+#blame_date {
+ float: left;
+ width: 7em;
+ overflow: auto;
+}
+#blame_author {
+ float: left;
+ width: 6em;
+ overflow: hidden;
+}
+#blame_code {
+ float:left;
+ width: 50%;
+ overflow: visible;
}
/* tree.tmpl */
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 3fb7a26..b48c564 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -202,16 +202,12 @@ static const struct got_error* match_logmsg(int *, struct got_object_id *,
struct got_commit_object *, regex_t *);
static const struct got_error* gw_blame(struct trans *);
-static const struct got_error* gw_blob(struct trans *);
-static const struct got_error* gw_blobdiff(struct trans *);
static const struct got_error* gw_commit(struct trans *);
static const struct got_error* gw_commitdiff(struct trans *);
-static const struct got_error* gw_history(struct trans *);
static const struct got_error* gw_index(struct trans *);
static const struct got_error* gw_log(struct trans *);
static const struct got_error* gw_raw(struct trans *);
static const struct got_error* gw_logbriefs(struct trans *);
-static const struct got_error* gw_snapshot(struct trans *);
static const struct got_error* gw_summary(struct trans *);
static const struct got_error* gw_tag(struct trans *);
static const struct got_error* gw_tree(struct trans *);
@@ -225,17 +221,13 @@ struct gw_query_action {
enum gw_query_actions {
GW_BLAME,
- GW_BLOB,
- GW_BLOBDIFF,
GW_COMMIT,
GW_COMMITDIFF,
GW_ERR,
- GW_HISTORY,
GW_INDEX,
GW_LOG,
GW_RAW,
GW_LOGBRIEFS,
- GW_SNAPSHOT,
GW_SUMMARY,
GW_TAG,
GW_TREE,
@@ -243,17 +235,13 @@ enum gw_query_actions {
static struct gw_query_action gw_query_funcs[] = {
{ GW_BLAME, "blame", gw_blame, "gw_tmpl/index.tmpl" },
- { GW_BLOB, "blob", gw_blob, "gw_tmpl/index.tmpl" },
- { GW_BLOBDIFF, "blobdiff", gw_blobdiff, "gw_tmpl/index.tmpl" },
{ GW_COMMIT, "commit", gw_commit, "gw_tmpl/index.tmpl" },
{ GW_COMMITDIFF, "commitdiff", gw_commitdiff, "gw_tmpl/index.tmpl" },
{ GW_ERR, NULL, NULL, "gw_tmpl/index.tmpl" },
- { GW_HISTORY, "history", gw_history, "gw_tmpl/index.tmpl" },
{ GW_INDEX, "index", gw_index, "gw_tmpl/index.tmpl" },
{ GW_LOG, "log", gw_log, "gw_tmpl/index.tmpl" },
{ GW_RAW, "raw", gw_raw, "gw_tmpl/index.tmpl" },
{ GW_LOGBRIEFS, "logbriefs", gw_logbriefs, "gw_tmpl/index.tmpl" },
- { GW_SNAPSHOT, "snapshot", gw_snapshot, "gw_tmpl/index.tmpl" },
{ GW_SUMMARY, "summary", gw_summary, "gw_tmpl/index.tmpl" },
{ GW_TAG, "tag", gw_tag, "gw_tmpl/index.tmpl" },
{ GW_TREE, "tree", gw_tree, "gw_tmpl/index.tmpl" },
@@ -588,22 +576,6 @@ gw_blame(struct trans *gw_trans)
}
static const struct got_error *
-gw_blob(struct trans *gw_trans)
-{
- const struct got_error *error = NULL;
-
- return error;
-}
-
-static const struct got_error *
-gw_blobdiff(struct trans *gw_trans)
-{
- const struct got_error *error = NULL;
-
- return error;
-}
-
-static const struct got_error *
gw_commit(struct trans *gw_trans)
{
const struct got_error *error = NULL;
@@ -648,14 +620,6 @@ gw_commitdiff(struct trans *gw_trans)
}
static const struct got_error *
-gw_history(struct trans *gw_trans)
-{
- const struct got_error *error = NULL;
-
- return error;
-}
-
-static const struct got_error *
gw_index(struct trans *gw_trans)
{
const struct got_error *error = NULL;
@@ -803,14 +767,6 @@ gw_logbriefs(struct trans *gw_trans)
}
static const struct got_error *
-gw_snapshot(struct trans *gw_trans)
-{
- const struct got_error *error = NULL;
-
- return error;
-}
-
-static const struct got_error *
gw_summary(struct trans *gw_trans)
{
const struct got_error *error = NULL;
@@ -2441,9 +2397,9 @@ gw_get_file_blame(struct trans *gw_trans, char *commit_str)
struct got_object_id *commit_id = NULL;
struct got_blob_object *blob = NULL;
char *blame_html = NULL, *path = NULL, *in_repo_path = NULL,
- *blame_row = NULL, *id_str, *folder = NULL;
+ *folder = NULL;
struct blame_cb_args bca;
- int nentries, i, obj_type;
+ int i, obj_type;
size_t filesize;
error = got_repo_open(&repo, gw_trans->repo_path, NULL);
diff --git a/gotweb/gotweb_ui.h b/gotweb/gotweb_ui.h
index d598d70..15583f4 100644
--- a/gotweb/gotweb_ui.h
+++ b/gotweb/gotweb_ui.h
@@ -247,11 +247,11 @@ char *log_blame_navs =
char *log_blame_line =
"<div id='blame_wrapper'>" \
- "<div id='blame'>%.*d</div>" \
- "<div id='blame'>%.8s</div>" \
- "<div id='blame'>%s</div>" \
- "<div id='blame'>%-8s</div>" \
- "<div id='blame'>%s</div>" \
+ "<div id='blame_number'>%.*d</div>" \
+ "<div id='blame_hash'>%.8s</div>" \
+ "<div id='blame_date'>%s</div>" \
+ "<div id='blame_author'>%-8s</div>" \
+ "<div id='blame_code'>%s</div>" \
"</div>";
/* tree.tmpl */