نمودار کامیت

148 کامیت‌ها

مولف SHA1 پیام تاریخ
Lars Hjemli
25da3f7625 Remove unused variable from ui-repolist.c:read_agefile()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-23 19:22:20 +02:00
Lars Hjemli
57f6a8bf0d Show time since last change on index page
When creating the index page, an optional file can be scanned per repository
to obtain a timestamp for last modification within the repo. If such a file
cannot be found, st_mtime for repo.defbranch is used instead.

This information is then printed in a new column, "Idle", using the new
function cgit_print_age().

The new parameter "repo.agefile" can be used to specify (globally) a relative
path to scan (default value is "info/web/last-modified").

The content of the "last-modified" file can be generated by the post-receive
hook with a command like this:

	git-for-each-ref --format="%(committerdate)" --sort=-committerdate \
	--count=1 > $GIT_DIR/info/web/last-modified

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-22 23:25:25 +02:00
Lars Hjemli
237ef7b06d Use cgit_print_age() on summary and log pages
Update the pages to show relative dates instead of yyyy-mm-dd hh:mm:ss

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-22 23:15:36 +02:00
Lars Hjemli
5db39170b6 Add cgit_print_age() function
This function can be used to print relative dates, just as in gitweb. Next
step will be to actually use the new function.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-22 23:12:41 +02:00
Lars Hjemli
3b86b44fc7 css: make column headings bold
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-21 00:29:11 +02:00
Lars Hjemli
0b8b6a3176 Make frontpage friendlier
This is an attempt to make the index page more usable by changing how
repo groups and repo links are displayed.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-21 00:14:28 +02:00
Lars Hjemli
271ac5a7e6 Merge branch 'repogroups'
* repogroups:
  Adjust apperance of repogroup headers
  Don't highlight repogroup headings
  Teach cgit how to group repositories by category
2007-05-20 22:13:17 +02:00
Lars Hjemli
7b39144a54 Adjust apperance of repogroup headers
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-20 22:12:54 +02:00
Lars Hjemli
dc3ac3f760 Merge branch 'virtual-url'
* virtual-url:
  Don't be fooled by trailing '/' in url-parameter
  cache_safe_filename() needs more buffers
  Enable url=value querystring parameter
  Add lookup-function for valid repo commands
  Move cgit_get_repoinfo into shared.c
2007-05-20 22:09:55 +02:00
Lars Hjemli
977a0b173d Merge branch 'index-header'
* index-header:
  Teach cgit howto include an external file on index page.
  Add html_include()
2007-05-20 14:33:59 +02:00
Lars Hjemli
d4dbfdfbae Use git-1.5.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-20 13:41:05 +02:00
Lars Hjemli
de69ce020c Teach cgit howto include an external file on index page.
The new parameter index-header can be used to name an external file
which will be included verbatim at the top of the index page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-19 00:00:25 +02:00
Lars Hjemli
5e75128a8b Add html_include()
This is a function used to include external htmlfiles in cgit-
generated pages.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 23:56:10 +02:00
Lars Hjemli
2aef89e5da Don't highlight repogroup headings
Specify class='nohover' to avoid highlighting this row.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 23:17:09 +02:00
Lars Hjemli
5877c49f68 Teach cgit how to group repositories by category
The new parameter 'repo.group' is used to set the repository group
for the following repositores. Whenever this parameter changes value,
a subheading is generated in the index page (printing the current value
of repo.group).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:18 +02:00
Lars Hjemli
3de63b264c Don't be fooled by trailing '/' in url-parameter
cgit_parse_url() didn't check if the path-part of urls contained a
real path or just a trailing slash. This made the log-page die since
the path filtering supplied an invalid path argument. This fixes it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:02 +02:00
Lars Hjemli
72fa5c63f8 cache_safe_filename() needs more buffers
The single static buffer makes it impossible to use the result of two
different calls to this function simultaneously. Fix it by using 4
buffers.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:02 +02:00
Lars Hjemli
30ccdcaa74 Enable url=value querystring parameter
This makes is possible to use repo-urls like '/pub/scm/git/git.git' and
even add path specifications, like '/pub/scm/git/git.git/log/documentation'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:01 +02:00
Lars Hjemli
43d40f2b70 Add lookup-function for valid repo commands
This will be usefull when parsing url arguments.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:01 +02:00
Lars Hjemli
305414df12 Move cgit_get_repoinfo into shared.c
This function will be usefull when parsing url arguments.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:51:01 +02:00
Lars Hjemli
08cc2e5f0e Remove unused extern declarations from cgit.h
Some unused declarations from the early days of cgit are removed.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 22:50:45 +02:00
Lars Hjemli
e189344a7d Add knobs to enable/disable files/lines changed in log view
These columns can cause lots of IO on the server, so add settings to
explicitly enable them. Also, add per repo settings to optionally disable
the columns if sitewide enabled.

While at it, do not allow repo.snapshot to enable snapshots if the global
setting is disabled.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-18 13:55:52 +02:00
Lars Hjemli
c1ad6cb778 Restrict length of repo description on repolist page
If any repo has a very long description, all repos suffer since the
repo-links in the right-most column gets pushed out of sight.

Fix it by introducing max-repodesc-length parameter in cgitrc, and default
to 60 chars.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 10:46:59 +02:00
Lars Hjemli
f4f1339fe6 Don't die when diffing trees with subprojects
The subprojects needs special handling, since they refer to objects
which normally won't exist in the refering repository.

Fix some extended header bugs and missing features while at it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 04:21:06 +02:00
Lars Hjemli
d82c08a044 Do not wrap filemode column in diffstat table
The diffstat looks rather ugly when the filemode is wrapped to one
char per line, so lets force it to not wrap.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 03:30:57 +02:00
Lars Hjemli
8f6f8c3406 Add C D L and T links to index page
These are of course Commit, Diff, Log and Tree pages, all accessed w.o.
specifying refname or sha1.

Sadly, the layout is neither pretty nor accessible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 02:16:55 +02:00
Lars Hjemli
723469962b Make git_pageurl handle NULL querystrings
This is suddenly useful after the repo.defbranch-related changes.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 02:06:28 +02:00
Lars Hjemli
97de8f0554 Add support for tree listing via h parameter
This makes the tree page benefit from repo.defbranch.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 01:39:08 +02:00
Lars Hjemli
dff894d129 Add link to commitdiff below diffstat
This link is a lot easier to locate than the links to the right of the
parent entries.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 01:16:56 +02:00
Lars Hjemli
f9ff7df613 Add support for commitdiff via h parameter
The commitdiff will be generated against the first parent, and the
diff page also gets the benefit of repo.defbranch.

Cleaned up some bad whitespace in cgit.h while at it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 00:58:35 +02:00
Lars Hjemli
a2ddc10479 Change commit-view to expect h parameter, not id
The change makes the commit-page benefit from repo.defbranch.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 00:26:23 +02:00
Lars Hjemli
b28b105ec1 Enable default value for head parameter
Pages which expect head to be specified in the querystring can now be
given a default value, configurable per repository (via repo.defbranch,
which defaults to "master").

Currently, only the log page actually works without parameters, but the
defbranch is bound to be exploited.

This also removes some dead code from shared.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-16 00:16:00 +02:00
Lars Hjemli
47a81c77fd Restrict deep nesting of configfiles
There is no point in restricting the number of included config-
files, but there is a point in restricting the nestinglevel
of configfiles: to avoid recursive inclusions. This is easily
achieved by decrementing the static nesting-variable upon exit
from cgit_read_config().

Also fix some whitespace breakage.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 23:32:25 +02:00
Lars Hjemli
ad3b39d3b8 Include cgit.conf in Makefile
This allows persistent overrides of Makefile settings without touching
the Makefile.

Suggested in a patch by Kristian Høgsberg <krh@bitplanet.net>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 18:41:31 +02:00
Lars Hjemli
c94afaacf4 ui-diff: show /dev/null as filename for add/delete
The diff headers showed an invalid filename when a patch created or
deleted a file. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 09:27:27 +02:00
Lars Hjemli
e903011c44 Use tables and css to create the diffstat graph, fix scaling
There was no need to use image-files for the graphs, so lets drop them.
At the same time, fix scaling of the graphs so that the full width is
used only if atleast 100 LOC are changed in one of the files.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 09:09:42 +02:00
Lars Hjemli
cfd2aa0797 Do not alter incoming sha1 when handling the download refs.
The code used to overwrite the const sha1 parameter just to avoid declaring
an extra variable. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 01:05:39 +02:00
Lars Hjemli
ea2831f1c8 Don't hardcode urls when SCRIPT_NAME is available
Also, let the makefile define the name of the installed cgi and
use that definition as a default value for cgit_script_name variable.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 00:48:31 +02:00
Lars Hjemli
6fb7d09fea ui-shared.c: fix whitespace breakage
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 00:22:17 +02:00
Lars Hjemli
495e396773 Show tag heading even if first tag is of the lightweight kind
The tag printing code waited for valid tags before printing the
table heading, but forgot to count unannotated tags. This fixes it.

Noticed by Kristian Høgsberg <krh@bitplanet.net>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 00:07:37 +02:00
Lars Hjemli
9927e63f38 Specify static storage class for file-local declarations
Also fix some whitespace issues while at it.

Noticed by Kristian Høgsberg <krh@bitplanet.net>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-15 00:00:37 +02:00
Lars Hjemli
5ec6e02bd1 Add include-parameter to config files
This parameter can be used to include another config-file, like
a standalone repository listing.

Suggested in a patch by Kristian Høgsberg <krh@bitplanet.net>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14 23:40:33 +02:00
Lars Hjemli
9ecde6568a Let makefile override the configfile location
Pass CGIT_CONFIG from makefile during build, to enable stuff like

  make CGIT_CONFIG=/var/cgit/cgit.conf

Noticed by Kristian Høgsberg <krh@bitplanet.net>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14 23:09:49 +02:00
Lars Hjemli
5b94c96a83 cgit.c: fix whitespace breakage 2007-05-14 22:58:01 +02:00
Lars Hjemli
a342ac6b4d cgit.css: try to make diffs look a little bit nicer
This makes the diffview look more like 'git-diff' in a terminal.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14 22:43:38 +02:00
Lars Hjemli
a1a0cd8b5a cgit.css: try do make diffstat a little bit nicer
I'm still no webdesigner, but this seems to be a more pleasant "visual
experience".

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14 18:10:32 +02:00
Lars Hjemli
9fb53af215 Add log filtering by path and link to it from tree view
This enables path-filtering in log-view, and adds a link per entry in
tree-view to show the log for each file/directory.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-14 11:13:18 +02:00
Lars Hjemli
4fdf571c88 cgit v0.4
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 23:28:19 +02:00
Lars Hjemli
6a8749d3bd Add commitdiff between commit and each of it's parent
A link is added next to each parent of a commit, leading to the new
diff-functionality in ui-diff.c.

Also added support for a path-parameter to filelevel diffs accessed via the
diffstat.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 23:27:53 +02:00
Lars Hjemli
8a3685bcf2 Add graphical diffstat to commit view
The diffstat is calculated against the leftmost parent of the commit. This
gives nice information for "normal" merges while octopus merges are less
than optimal, so the diffstat isn't calculated for those merges.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 22:31:11 +02:00