Commit Graph

106 Commits

Author SHA1 Message Date
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
Lars Hjemli
c6cf3a424a Add max-commit-count parameter to cgitrc
This enabled customizing number of commits shown per page in log view. It
also changes the default from 100 to 50, mainly due to the more cpu
intensive log pages (number of files/lines changed) but also since 100
log messages requires excessive scrolling.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 17:15:06 +02:00
Lars Hjemli
80e577c3ef Show number of changed lines in log view
Use the new file-diff interface to calculate number of changed lines
per commit.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 17:03:27 +02:00
Lars Hjemli
38a0f9cd89 Simplify ui-diff.c using the new file-level diff interface
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 14:21:46 +02:00
Lars Hjemli
c4ef667961 Add standard interface for file diff functions
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 14:21:19 +02:00
Lars Hjemli
48dc00342e Show number of changed files in log view
This uses the new tree-diff functions to calculate number of files
changed per commit.

Also fix some whitespace issues.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 11:42:40 +02:00
Lars Hjemli
ae4c1ee113 Use standard tree-diff function when showing diffstat for single commit
Remove unneeded code from ui-commit.c and replace with call to standard
diff-functions.

Also fix some whitespace issues.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 11:30:18 +02:00
Lars Hjemli
1b49de3c2c Add shared diff-handling functions
This adds a standard interface for tree diffing.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-13 11:24:23 +02:00
Lars Hjemli
f5af0beb6a css: fix bad rendering in Internet Explorer
The layout-tables used border-collapse:separate, which maked all pages look
really bad in IE. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-12 00:29:37 +02:00
Lars Hjemli
9f48df63f6 Add links to enable downloading of tagged blobs
All tags below refs/archives are shown on the repo summary page as
download links. The links referes to the tagged objects, using the
tag name as filename for download.

This can be used to add shortcuts for release tarballs, documentation
and other blobs stored in the object database, especially blobs that
are not reachable during cloning.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 23:44:42 +02:00
Lars Hjemli
f596d10d73 Makefile: add support for building w.o. preinstalled git
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 20:41:14 +02:00
Lars Hjemli
dad80d1ff8 Tag release v0.3
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 12:15:44 +02:00
Lars Hjemli
5a217ed3e0 Update README with submodule build info
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 12:13:15 +02:00
Lars Hjemli
ded9393b17 Add submodule links in tree listing
When a submodule occurs in a tree, generate a link to show the
module/commit. The link is specified as a sprintf string in /etc/cgitrc,
using parameters 'module-link' and 'repo.module-link'. This should probably
be extended with repo.module-link.$path.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 12:12:48 +02:00
Lars Hjemli
cc1dbd1b5d Add submodules.sh and use it during builds
This adds a shell script which can be be used to initialize, list and
update submodules in a git repository. It reads the file .gitmodules
to find a mapping between submodule path and repository url for the
initial clone of all submodules.

The script is used during cgit builds to enable automatic download and
checkout of the git git repository.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 11:03:52 +02:00
Lars Hjemli
e743443811 Added git as a submodule
This commit adds the subdirectory 'git' as a submodule containing
the git git repository, but doesn't add support for automatically
cloning the submodule.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-11 10:59:10 +02:00
Lars Hjemli
ca8eb8fc8f Add support for downloading single blobs
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-09 00:48:09 +02:00
Lars Hjemli
7250a15467 ui-view: show pathname if specified in querystring
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-08 23:52:56 +02:00
Lars Hjemli
61c3ca978c Update to libgit 1.5.2-rc2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-08 23:38:49 +02:00
Lars Hjemli
66cacd053b Layout update 2007-02-21 00:24:36 +01:00
Lars Hjemli
ac70cb4795 Make snapshot feature configurable
Snapshots can now be enabled/disabled by default for all repositories in
cgitrc with param "snapshots". Additionally, any repo can override the
default setting with param "repo.snapshots".

By default, no snapshotting is enabled.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-08 14:47:56 +01:00
Lars Hjemli
ab2ab95f09 Add support for snapshots
Make a link from the commit viewer to a snapshot of the corresponding tree.

Currently only zip-format is supported.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-08 13:58:58 +01:00
Lars Hjemli
14d360df60 cgit v0.2
Main changes since v0.1:
  -list tags in repo summary
  -allow search in log-view
  -read repository paths from cgitrc

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-05 00:22:08 +01:00
Lars Hjemli
c52e84135e Add support for prefix and gitsrc arguments to 'make'
This should improve the installation a little, especially since the new
options are mentioned in the README. Also, add a make-rule to build the
git binaries if necessary + a dependency between cgit and libgit.a.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-05 00:12:04 +01:00
Lars Hjemli
74b0db9556 Update cgitrc template
Make the descriptions more helpfull.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-04 23:24:08 +01:00
Lars Hjemli
8fb2f05696 Add support for lightweight tags
There is nothing bad about a tag that has no tag-object, but the old code
didn't handle such tags correctly. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-04 22:55:19 +01:00
Lars Hjemli
ce1c7336e5 Read repo-info from /etc/cgitrc
This makes cgit read all repo-info from the configfile, instead of scanning for
possible git-dirs below a common root path. This is primarily done to get
better security (separate physical path from logical repo-name).

In /etc/cgitrc each repo is registered with the following keys:

repo.url
repo.name
repo.path
repo.desc
repo.owner

Note:

*Required keys are repo.url and repo.path, all others are optional
*Each occurrence of repo.url starts a new repository registration
*Default value for repo.name is taken from repo.url
*The value of repo.url cannot contain characters with special meaning for
 urls (i.e. one of /?%&), while repo.name can contain anything.

Example:

repo.url=cgit-pub
repo.name=cgit/public
repo.path=/pub/git/cgit
repo.desc=My public cgit repo
repo.owner=Lars Hjemli

repo.url=cgit-priv
repo.name=cgit/private
repo.path=/home/larsh/src/cgit/.git
repo.desc=My private cgit repo
repo.owner=Lars Hjemli

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-04 21:47:46 +01:00
Lars Hjemli
ebd7b0fbc3 Do not die if tag has no message
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-04 21:21:46 +01:00
Lars Hjemli
bb3e7950c3 Fix search for non-virtual urls
When cgit don't use virtual urls, the current repo and page
url parameters must be included in the search form as hidden
input fields.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-02-03 13:10:26 +01:00
Lars Hjemli
66414b68cf Update README with install/config information
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-28 13:18:23 +01:00
Lars Hjemli
3c388a3bf8 Add template for /etc/cgitrc
This doubles as documentation of the parameteres :)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-28 12:52:14 +01:00
Lars Hjemli
7dd50c98d7 Add parameter to adjust max message length in log listings
The parameter "max-message-length" can be specified in cgitrc, default value
is 60.

This affects the log message shown in repo summary and shortlog.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-28 12:17:03 +01:00
Lars Hjemli
d8b0cca260 Set explicit font size
This might be bad style, but cgit really needed smaller fonts.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-28 12:01:21 +01:00
Lars Hjemli
8596cda71d Change global document layout
Use a document-wide table for the main layout

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
2007-01-28 11:33:55 +01:00
Lars Hjemli
4a9dea5c01 Unified install path
Install all files into single directory

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
2007-01-28 11:31:57 +01:00
Lars Hjemli
777faf7e50 Cleanup table listings
Make the output for <table class='list'> a bit nicer

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
2007-01-28 00:52:41 +01:00
Lars Hjemli
447025f62c Enable building with debuginfo
Add -g to CFLAGS when running make with DEBUG=1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-17 01:13:05 +01:00
Lars Hjemli
23734c5a2b Extend repo summary with tag list
Show all tags in the repo below the branch list.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-17 01:10:39 +01:00
Lars Hjemli
a69061fdb7 Add function cgit_parse_tag()
Teach cgit how to extract author info from a tag.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-17 01:09:51 +01:00
Lars Hjemli
06c81d6faa Add some more decls from git (cache.h, tag.h)
This is in preparation for extended tag support in cgit

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-17 01:07:31 +01:00
Lars Hjemli
66091f934a Handle empty/malformed commit messages
An empty commit message would trigger a segfault in the current
cgit_parse_commit().

Also, make sure that all char-pointers are properly initialized.
2007-01-16 18:41:01 +01:00
Lars Hjemli
5cd2bf7e7f WIP: add paths/backlinks to tree/blobview 2007-01-12 00:46:17 +01:00
Lars Hjemli
2c2047ff67 Remove troublesome chars from cachefile names
Add a funtion cache_safe_filename() which replaces possibly bad filename
characters with '_'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-01-12 00:24:35 +01:00