Commit Graph

101 Commits (4fdf571c888fd38ae362684c429a3bdf24240ef7)
 

Author SHA1 Message Date
Lars Hjemli 4fdf571c88 cgit v0.4
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli 38a0f9cd89 Simplify ui-diff.c using the new file-level diff interface
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli c4ef667961 Add standard interface for file diff functions
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli 1b49de3c2c Add shared diff-handling functions
This adds a standard interface for tree diffing.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli f596d10d73 Makefile: add support for building w.o. preinstalled git
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli dad80d1ff8 Tag release v0.3
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 5a217ed3e0 Update README with submodule build info
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli ca8eb8fc8f Add support for downloading single blobs
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 7250a15467 ui-view: show pathname if specified in querystring
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 61c3ca978c Update to libgit 1.5.2-rc2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 66cacd053b Layout update 18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
Lars Hjemli 74b0db9556 Update cgitrc template
Make the descriptions more helpfull.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
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>
18 years ago
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>
18 years ago
Lars Hjemli ebd7b0fbc3 Do not die if tag has no message
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
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>
18 years ago
Lars Hjemli 66414b68cf Update README with install/config information
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 3c388a3bf8 Add template for /etc/cgitrc
This doubles as documentation of the parameteres :)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
Lars Hjemli 4a9dea5c01 Unified install path
Install all files into single directory

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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>
18 years ago
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.
18 years ago
Lars Hjemli 5cd2bf7e7f WIP: add paths/backlinks to tree/blobview 18 years ago
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>
18 years ago
Lars Hjemli 83a5f35a27 Move cache_prepare() to cgit
This moves some cgit-specific stuff away from cache.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli f98e72684b Use long instead of int when converting from TTL to seconds
Just to be really, really sure about embarrasing overflow settings

Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
18 years ago
Lars Hjemli a6a1112528 Use TTL-settings even in nocache mode
In nocace mode an uninitialized ttl-setting was used to generate http-Expires
header. Fix it.

Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
18 years ago
Lars Hjemli 52e605caf5 Handle %xx encoding in querystring
Convert valid %xx expressions in querystring to ascii, ignore invalid
expressions (i.e. eat the three characters %xx).

Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
18 years ago
Lars Hjemli 05b13194b4 Handle '+' in querystring
Translate '+' to ' ' in querystring parser (still doesn't handle %xx)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago