Commit Graph

83 Commits (ca8eb8fc8f71ee0a40015c323619f776840b6503)
 

Author SHA1 Message Date
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
Lars Hjemli 732d68d240 Add basic log filtering
This enables case-insensitive grep on logentris using the new search box

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli e39d738c39 Add generic support for search box in page header
This adds the ability to show a search box in any pageheader with correct href and
hidden form data, but does not enable the box on any pages.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 27cd3b2a70 Test for NULL-pointers in html_txt() and friends
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli c43f1246cb Minor style fixes
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 2efee09abe Add missing diff-link in ui-commit.c
Gaah.

This should have been a part of 36aba00273

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 9d8d9b6123 Only show first 80 characters of commit subject in log and summary
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 378cae6398 Add missing ttl-options in config
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 8e495b075d cgit 0.1
With a working diff, it really has all the basics.

Next steps will be to make it more usable and less ugly :)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 40dea5254a Let make know that ui-diff.c depends on xdiff.h
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 36aba00273 Add basic diff view
Finally, xdiff is used to show per-file diffs via commit view.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli a53042865a Use html_filemode in ui-tree.c
No reason to show "100644" when we can show "-rw-r--r--"

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli fb6e5869dc Don't show new and old filemode for added/removed files
It gives us no extra info whatsoever to show "----------" for either new
or old mode, it's just noise (especially since we now show the "old"
filemode for deleted files)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 6cb326c83b Show list of modified files in ui-commit.c
Compare current commit with 1.parent, and for each affected file display
current filemode, old filemode if changed, current filename and source
filename if it was a copy/rename.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 9c5229ea39 Reformat code to avoid excessive line lengths
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli aaa24bdd30 Add cgit_free_commitinfo() and use where needed
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli fa82b03e05 Simplify ui-commit.c
Replace the call to lookup_commit() with a call to lookup_commit_reference,
since it handles reading and parsing of the commit object internally.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 8960d267ed Show emails and timestamps in ui-commit.c
Use the extra info found in commitinfo struct when generating commit
view.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
18 years ago
Lars Hjemli 77078ba716 Teach commit parser about author/committer email + timestamp
We want all four of these when showing a commit, so save them in the
commitinfo struct.

Btw: There's probably no good reason to save committer timestamp since
it's already available in commit->date. But it doesn't hurt us either,
and it makes the parser look more complete, so we just do it.

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