all repos — cgit @ 92908af4558d7362c7deeb05254343a5a5f11a05

a hyperfast web frontend for git written in c

92908af4
Move cgit_version from shared.c to cgit.c

With the matching Makefile change, this makes sure that only cgit.o and cgit
proper needs to be rebuildt when VERSION has been modified.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 23:10:59 +0100
df90b51b
Makefile: autobuild dependency rules

This uses gcc to generate dependency rules for each `.o` file, based on the
corresponding `.c` file, into a new set of `.d` files (which are also defined
to depend on the same set of source files as their `.o` files).

Result:
* all objectfile dependencies are correctly calculated
* only the necessary dependencies are recalculated when a sourcefile is updated

Inspiration for the build rules:
* http://www.gnu.org/software/make/manual/make.html#Automatic-Prerequisites
* http://make.paulandlesley.org/autodep.html

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 23:01:44 +0100
27181869
Initial Makefile cleanup

Sort the list of object files to improve readability/mergeability and remove
manual dependency information which will soon be generated automatically.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 20:49:41 +0100
163037e7
Move non-generic functions from shared.c to cgit.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 17:26:08 +0100
a4d1ca1d
Add ui-shared.h

This is finally a proper headerfile for the shared ui-functions which
used to reside in cgit.h

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 16:50:57 +0100
c5984a98
Add separate header-files for each page/view

Yet another step towards removing cgit.h.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 16:38:47 +0100
f34478cb
Refactor snapshot support

The snapshot support needs to be split between output- and config-related
functions to get the layering between shared.c and ui-*.c right. There
is also some codestyle-issues which needs fixing to make the snapshot
functions more similar to the rest of the cgit code.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 16:00:27 +0100
e0e4478e
Add command dispatcher

This simplifies the code in cgit.c and makes it easier to extend cgit with
new pages/commands.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 01:09:39 +0100
b608e88a
Remove obsolete cacheitem parameter to ui-functions

This parameter hasn't been used for a very long time...

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 01:00:36 +0100
f3c1a187
Add struct cgit_page to cgit_context

This struct is used when generating http headers, and as such is another
small step towards the goal of the whole cleanup series; to invoke each
page/view function with a function pointer.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Mar 2008 00:51:19 +0100
b1f9b9c1
Introduce html.h

All html-functions can be quite easily separated from the rest of cgit, so
lets do it; the only issue was html_filemode which uses some git-defined
macros so the function is moved into ui-shared.c::cgit_print_filemode().

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 23 Feb 2008 22:45:33 +0100
b88fb016
Improve initialization of git directory

Using the functions offered by libgit feels like the right thing to do. Also,
make sure that config errors gets properly reported.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Feb 2008 21:16:53 +0100
d1f3bbe9
Move cgit_repo into cgit_context

This removes the global variable which is used to keep track of the
currently selected repository, and adds a new variable in the cgit_context
structure.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Feb 2008 13:56:09 +0100
b228d4ff
Add all config variables into struct cgit_context

This removes another big set of global variables, and introduces the
cgit_prepare_context() function which populates a context-variable with
compile-time default values.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Feb 2008 13:07:13 +0100
d14d77fe
Introduce struct cgit_context

This struct will hold all the cgit runtime information currently found in
a multitude of global variables.

The first cleanup removes all querystring-related variables.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Feb 2008 11:53:40 +0100
e5ed227e
Use GIT-1.5.4.1
Lars Hjemli hjemli@gmail.com
Sat, 16 Feb 2008 11:22:06 +0100
2106c96c
Use GIT-1.5.4
Lars Hjemli hjemli@gmail.com
Sat, 02 Feb 2008 08:55:09 +0100
ac195ce7
Use GIT-1.5.4.rc5
Lars Hjemli hjemli@gmail.com
Mon, 28 Jan 2008 21:18:28 +0100
776200b1
Use GIT-1.5.4.rc4
Lars Hjemli hjemli@gmail.com
Sun, 13 Jan 2008 19:16:23 +0100
2122c696
Merge branch 'stable'

* stable:
  CGIT 0.7.2
  Use GIT-1.5.3.8
  Compare string lengths when parsing the snapshot mask
  Default repo description to "[no description]"
Lars Hjemli hjemli@gmail.com
Sun, 13 Jan 2008 18:34:37 +0100
f39c3c99
Check for NULL-subject in patch view

While at it, make sure the commit message ends with a '\n'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 18 Dec 2007 08:26:50 +0000
f80ff37a
Handle missing default branch and error out on invalid branch names

When no branch is specified and the repository does not have a default branch,
use the first branch.

Also, print sensible errormessages when the repository does not contain any
branches and when invalid branchnames are specified.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 04 Jan 2008 13:43:40 +0100
620bb3e5
Add plain patch view

The new view mimics the output from `git format-patch`, making it possible
to cherry-pick directly from cgit with something like `curl $url | git am`.

Inspired by a patch to `git-apply` by Mike Hommey:
  http://thread.gmane.org/gmane.comp.version-control.git/67611/focus=67610

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 10 Dec 2007 21:47:29 +0100
afcdd083
Add support for automatic and custom clone urls

This adds support for two new parameters to cgitrc: clone-prefix and
repo.clone-url.

If clone-prefix is specified, all repos will get a clone url printed in the
sidebar; the url is generated by clone-prefix + repo.url.

Additionally, each repo can specify repo.clone-url which will override any
such auto-generated url.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Dec 2007 01:49:38 +0100
dabb34af
Merge branch 'stable'

* stable:
  Handle missing timestamp in commit/tag objects
  Set commit date on snapshot contents
Lars Hjemli hjemli@gmail.com
Sun, 02 Dec 2007 22:28:37 +0100
e8e67218
Add cell-spacing in html

There are some browsers which don't support the border-spacing property

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 16 Nov 2007 10:28:29 +0100
6ef637e0
Use tables for page layout

It feels like the Right Thing, and it fixes some rendering problems in a
much used webbrowser.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 16 Nov 2007 09:52:03 +0100
fd90d282
Gimp my logo

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 16 Nov 2007 09:51:35 +0100
d267d88c
Add support for "robots" meta-tag

With this change, cgit will start to generate the "robots" meta-tag, using
a default value of "index, nofollow".

The default value can be modified with a new cgitrc variable, "robots".

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 21:57:21 +0100
1b7c5b2e
Generate valid html for "downloads" menu header

Noticed-by: http://validator.w3.org
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 13:44:39 +0100
a7cf406c
Merge branch 'lh/testsuite'

* lh/testsuite:
  Set commit date on snapshot contents
  Fix html error detected by test-suite
  Create initial testsuite
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 13:17:13 +0100
ab21082c
Merge branch 'stable'

* stable:
  CGIT 0.7.1
  Makefile install: include cgit.png, do not empty cache

Conflicts:

	Makefile
Lars Hjemli hjemli@gmail.com
Fri, 09 Nov 2007 13:52:48 +0100
86d6dfa9
Minor css tweaks

Don't specify border and background color for input controls, reduce font-
size of heading in sidebar.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 09 Nov 2007 13:19:56 +0100
6e54bd00
Merge branch 'stable'

* stable:
  Support "/" as virtual-root
Lars Hjemli hjemli@gmail.com
Thu, 08 Nov 2007 12:22:39 +0100
1ae41a0d
Makefile: link with libiconv if NEEDS_LIBICONV is defined

This seems to be needed to compile on cygwin.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 06 Nov 2007 09:35:07 +0100
55ac326e
Merge branch 'iconv-rebased' of http://x2a.org/pub/git/cgit

* 'iconv-rebased' of http://x2a.org/pub/git/cgit:
  Use utf8::reencode_string from git
  Convert subject and message with iconv_msg.
  Add iconv_msg function.
  Set msg_encoding according to the header.
  Add commit->msg_encoding, allocate msg dynamicly.
Lars Hjemli hjemli@gmail.com
Tue, 06 Nov 2007 00:38:18 +0100
d04c4734
Show lines changed as -n/+m in shortlogs

This is way more informative than the total number of changed lines.

Suggested-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 06 Nov 2007 00:35:12 +0100
72ede125
Don't show the the branch selector button if javascript is enabled

Suggested-by: Olivier Ramonat <olivier@ramonat.fr>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 14:17:58 +0100
601c76eb
Do not require javascript-enabled clients

A simple submit-button is all that's required to make the branch selector
drop-down work on any client, so lets add one.

Noticed-by: Olivier Ramonat <olivier@ramonat.fr>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 14:05:12 +0100
e36365c6
CGIT 0.7
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 11:35:55 +0100
c2f75225
Use GIT-1.5.3.5

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 11:33:54 +0100
1e4ff4dc
Don't include current SHA1 in 'log' menu-item

This ensures that the menu-item always prints the log for the active branch.
Predictability is good.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 11:33:28 +0100
cda7194e
Don't include current path in menu links

The menu-links are a lot more predictable this way.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 11:23:47 +0100
68cf9b4f
Fix search form action/hidden fields

The search form didn't properly honor the current path, so this commit
fixes cgit_fileurl() and add_hidden_formfields() to make the issue go
away.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 11:15:56 +0100
51140311
Add search parameters to cgit_log_link

This makes the [prev] and [next] links work correctly on search results.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 10:42:37 +0100
df203a29
Fix typo in css

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Shunichi Fuji palglowr@gmail.com
Sat, 03 Nov 2007 09:36:09 +0100
0c8e184e
Change the cgit layout

This modifies and hopefully improves the layout of all cgit pages:

  * Remove the header from all pages and replace it with a sidebar;
    most pages have sufficient width but many needs more height.

  * Add a dropdown-box to switch between branches, using a one-liner
    javascript to reload the current page in context of the selected branch.

  * Include refs found below refs/archives in the sidebar, appearing as a
    set of menuitems below a 'download' heading.

  * Include the brand new cgit logo

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 30 Oct 2007 10:47:38 +0100
10ac7ad1
Add config param 'index-info'

This parameter will be used to include a html file in the upcoming sidebar
on the index page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 30 Oct 2007 10:39:59 +0100
fc5880fa
Teach cgit_object_link() about tag objects

This makes random tag links more helpfull, e.g. when a branch head references
a tag object, link to the tag page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Oct 2007 15:40:47 +0100
cbcdbcf2
Make print_branch() handle refs not pointing at commits

The master branch of stable/linux-2.6.20 currently references a tag
object, which makes print_branch() die with a segfault. This teaches
print_branch() to handle such cases more gracefully.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Oct 2007 15:36:18 +0100
68ca032d
Teach log search about --grep, --author and --committer

This makes the log searching more explicit, using a dropdown box to specify
the commit field to match against.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Oct 2007 15:23:00 +0100
6ec5f36f
Add html_option() function

This is a generic function used to output html "option" tags.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Oct 2007 12:08:45 +0100
0c8dd9c4
Merge branch 'stable'

* stable:
  cgit_parse_commit(): Add missing call to xstrdup()
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 13:55:44 +0200
b4d4a25a
Cleanup code introduced by the filter-refs topic

The functions used to print branches and tags were only half-done and
somewhat confused. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 13:34:17 +0200
dd0f27eb
Merge branch 'filter-refs'

* filter-refs:
  Add links to the new refs page from summary page
  Add support for refs view
  Make cgit_print_branches()/cgit_print_tags() external
  Add descriptions of summary-branches and summary-tags to cgitrc
  Add support for config param summary-branches
  Move logic for age comparision from cmp_tag_age into cmp_age()
  Add support for config param summary-tags
  Sort tags by age
  Use reflist to print tag info
  Use reflist to print branch info
  Add functions and types for ref lists
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:55:10 +0200
47bae9f5
Merge branch 'stable'

* stable:
  Skip unknown header fields when parsing tags and commits
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 09:15:41 +0200
f214118c
Merge branch 'stable'

* stable:
  correct typo in CSS
Lars Hjemli hjemli@gmail.com
Fri, 05 Oct 2007 16:20:13 +0200
9dda602c
Merge branch 'stable'

* stable:
  Use git-1.5.3.3
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:51:04 +0200
271829f2
cgit.css: make diff headers more visible

This modifies the background color of diff headers to make them easier to
spot.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:41:29 +0200
e238ebe1
ui-diff: add links to pre- and postversion of blobs

Each diff header now links to the old and new version of each file

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:30:29 +0200
97aec649
gen-version.sh: don't sed the output from git describe

Replacing '-' with '.' makes the version name slightly confusing, so lets
stick with the unmodified output of git describe.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:01:51 +0200
7e1af8ad
css: remove the annoying tr:hover rule for diffstat

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:09:07 +0200
0ec8791c
ui-commit.c: link to diff instead of tree from diffstat

This makes each entry in the diffstat link to a path-restricted diff.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 11:54:01 +0200
1a6025b7
Add prefix parameter to cgit_print_diff()

This allows a diff to be restricted to the path prefix specified in the url.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 11:46:38 +0200
f527a57c
Add prefix parameter to cgit_diff_tree()

This paramter can be used to restrict a diff to the specified path prefix.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 11:42:19 +0200
98fcf722
Add support for a renamelimit option in cgitrc

This option can be used to override the default rename-limit in git.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 24 Sep 2007 23:52:30 +0200
b65aa5d1
cgit v0.6.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 01:04:54 +0200
08b67765
Upgrade to GIT 1.5.3.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 01:03:25 +0200
4e40d850
Use trim_end() to remove trailing slashes

All urls and paths read from cgitrc needs to be 'normalized', i.e. get any
trailing slashes removed, and the trim_end() function works out nice for
this purpose.

Removing the trailing slashes also happens to fix the case where the virtual
root should be a single slash; that case used to require specifying the full
hostname (including the http:// prefix), but now it can simply be specified
as /.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 00:56:53 +0200
0835ffef
Remove a few compiler warnings

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 00:21:47 +0200
6df9c702
Add cgit.conf to .gitignore, remove *~

Not having cgit.conf in .gitignore is a bug, while having *~ is a personal
preference.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 00:11:03 +0200
ff7a3948
ui-tree: show last line of blob

The last line in a blob was never printed by ui-tree::print_object(), which
was particularly annoying when the blob missed a final newline. This fixes
the issue.

Noticed-by: <mkraai@beckman.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 20 Sep 2007 00:00:06 +0200
63d5f5ea
ui-tree: specify parameter position for all htmlf formats

The GNU C library manual tells us that behavior is undefined if only
some formats has a specification for the parameter position.

Noticed-by: <mkraai@beckman.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 19 Sep 2007 23:46:59 +0200
7921572f
fixed typo in cgitrc

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Fri, 14 Sep 2007 19:28:09 +0200
0602d8c4
Improve the sample cgitrc file

Added and documented missing cgitrc parameters, improved documentation
for virtual-root, added examples for repositories with a working
directory.

[lh:sligthly modified/extended]

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Chris Pickel sfiera@macports.org
Sat, 08 Sep 2007 19:37:43 -0400
4beecc9a
cgit v0.6.2
Lars Hjemli hjemli@gmail.com
Sat, 08 Sep 2007 19:10:37 +0200
6bfed7d2
Revert part of "Makefile: add support for DESTDIR"

This removes my editing on the patch received by Chris Pickel, as I didn't
understand the purpose of DESTDIR.

Noticed-by: Chris Pickel <sfiera@macports.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 08 Sep 2007 18:42:55 +0200
152c5e2a
Revert "Makefile: add missing references to DESTDIR"

This reverts commit fa31c5ed4839575c3ef3f6f0823fc2b4af47dbfd, as I
totally misunderstood the purpose of DESTDIR.

Noticed-by: Chris Pickel <sfiera@macports.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 08 Sep 2007 18:38:10 +0200
af38d656
cgit v0.6.1
Lars Hjemli hjemli@gmail.com
Sat, 08 Sep 2007 15:53:02 +0200
fa31c5ed
Makefile: add missing references to DESTDIR

When cgit is built it needs to get CGIT_CONFIG and CGIT_CACHE_ROOT prefix
with DESTDIR.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 08 Sep 2007 11:59:04 +0200
898f5f89
Make cgit honor CACHE_ROOT as defined in Makefile

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Chris Pickel sfiera@macports.org
Sat, 08 Sep 2007 11:39:44 +0200
97ded7c1
Makefile: add support for DESTDIR

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Chris Pickel sfiera@macports.org
Sat, 08 Sep 2007 11:34:11 +0200
96a24212
cgit v0.6

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 04 Sep 2007 11:54:37 +0200
bd8e8a3d
Update README

Add new build instructions, extend the "Missing features" section and add
a note about patches/email address of the author.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 04 Sep 2007 11:49:40 +0200
0de21a8d
Set xdemitconf_t.findfunc=NULL

This function-pointer was introduced in git v1.5.3-rc0-42-gf258475. It
needs to have a value, and setting it to NULL triggers the old behaviour
for selecting hunk headers.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 04 Sep 2007 11:04:47 +0200
ff133969
Merge branch 'jo/dirlink'

* jo/dirlink:
  Rename dirlink to gitlink.

Conflicts:

	ui-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Sep 2007 23:00:06 +0200
4e7e8bf9
Use git-1.5.3 as submodule

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Sep 2007 22:58:02 +0200
79f0c10d
Delete submodules.sh and prepare for using git-submodule

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Sep 2007 22:54:51 +0200
95eaf273
Makefile: add target "get-git"

The new target downloads a suitable git.git tarball from kernel.org and
unpacks it in the git directory.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Sep 2007 22:42:54 +0200
e8920b52
Rewrite the makefile + gen-version.sh

The old files were simply broken, hopefully the new ones will work out
somewhat better.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Sep 2007 21:52:14 +0200
1221adbb
ui-snapshot: whitespace/formatting cleanup

Introduce a #define for number of snapshot archive entries, move all decls
to function entrypoint, remove some trailing whitespace and reformat a few
lines.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 23 Jul 2007 22:51:45 +0200
43291e41
Make ui-tag.c generate valid xhtml

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 23 Jul 2007 01:42:49 +0200
f405d0bf
Add support for line number in url fragment

With this change, urls like http://hjemli.net/git/cgit/tree/ui-tree.c#43 can
be used to jump directly to the specified line number.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 23 Jul 2007 00:46:15 +0200
eb45342e
cgit_print_snapshot_links: use url to specify snapshot name

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 23 Jul 2007 00:11:15 +0200
1d4aaff6
Merge branch 'master' of git://git.klever.net/patchwork/cgit

* 'master' of git://git.klever.net/patchwork/cgit:
  link raw blob from tree file view
  fix: changed view link to blob in summary.
  allow selective enabling of snapshots
  shorten snapshot names to repo basename
  introduce cgit_repobasename
  added snapshot filename to the link
  add plain uncompressed tar snapshort format
  introduced .tar.bz2 snapshots
  compress .tar.gz using gzip as a filter
  added a chk_non_negative check
  css: adjust vertical-align of commit info th cells
  add support for snapshot tarballs

Conflicts:

	ui-summary.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 22 Jul 2007 23:57:48 +0200
4e9107ab
Add ui-tag.c

This file implements the tag-command, i.e. printing of annotated tags.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 22 Jul 2007 23:42:55 +0200
71ebcbe2
make gen-version.sh run even if . is not in PATH

Signed-off-by: Michael Krelin <hacker@klever.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Michael Krelin hacker@klever.net
Mon, 02 Jul 2007 02:29:11 +0200
51f65478
make config adjustable via env variable CGIT_CONFIG

Signed-off-by: Michael Krelin <hacker@klever.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Michael Krelin hacker@klever.net
Mon, 02 Jul 2007 02:29:12 +0200
16a3d277
Merge branch 'lh/menu'

* lh/menu:
  Add ofs argument to cgit_log_link and use it in ui-log.c
  Add trim_end() and use it to remove trailing slashes from repo paths
  Do not include current path in the "tree" menu link
  Add setting to enable/disable extra links on index page
  Change S/L/T to summary/log/tree
  Change "files" to "tree"
  Include querystring as part of cached filename for repo summary page
  Add more menuitems on repo pages
Lars Hjemli hjemli@gmail.com
Fri, 29 Jun 2007 20:32:08 +0200
f6925035
Add version info from git-describe

A new script, gen-version.sh, is now invoked from 'make version' to generate
the file VERSION. This file contains a version identifier generated by
git-describe and is included in the Makefile.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 18 Jun 2007 09:42:10 +0200
4a0be586
Add cgit_diff_link()

This adds a new function used to generate links to the diff page and uses
it everywhere such links appear (expect for single files in the diffstat
displayed on the commit page: this is now a link to the tree page).

The updated diff-page now expects zero, one or two revision specifiers, in
parameters head, id and id2. Id defaults to head unless otherwise specified,
while head (as usual) defaults to repo.defbranch. If id2 isn't specified, it
defaults to the first parent of id1.

The most important change is of course that now all repo pages (summary, log,
tree, commit and diff) has support for passing on the current branch and
revision, i.e. the road is now open for a 'static' menu with links to all
of these pages.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 18:12:03 +0200
faaca447
ui-commit: use cgit_commit_link() for parent links

This replaces the old cgit_pageurl() function with the brand new
cgit_commit_link() function, making parent links in commit view preserve
the current branch.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 15:44:22 +0200
cd79c168
ui-log: honor id=sha1 on querystring

This teaches ui-log to prefer id=sha1 and fallback to h=rev if no id-
parameter is specified. With this change, summary, log, commit and tree
views now passes current branch using h parameter and current revision
using id parameter.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 14:58:45 +0200
42a7eb9c
Add cgit_commit_link() + support for id=sha1 to commit view

This adds a function to generate links to the commit page and extends said
page to use id from querystring as primary revision specified (fallback to
h).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 14:53:02 +0200
48c487d7
Add git_log_link() and fix bug in generic repolink function

The generic repolink function compared head with cgit_query_head, which
almost always would be the same pointer. The test now compares with
repo.defbranch, which is the wanted behavour.

Bug discovered while adding cgit_log_link(), so this commit also contain
that change.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 13:57:51 +0200
426032f7
ui-tree: html/css cleanup

Various fixes to make html and css more "clean". The only visible change
is the link to file/directory log: it is now printed as "L" (for Log)
instead of "H" (for History).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 13:17:00 +0200
486c87ec
ui-shared: use strcmp() to compare strings

Somehow a couple of pointer comparisions crept into the new repolink()
and cgit_tree_link() functions. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 12:58:59 +0200
44947bfc
Add and use cgit_tree_link()

This creates a new function used to generate links to 'tree' page and uses
the function everywhere a link to the 'tree' page is generated.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 17 Jun 2007 01:23:08 +0200
f91b9696
ui-tree: make blob viewer generate valid html

A leftover '</td></tr>' made ui-tree generate invalid html for blob
content. Fix it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Jun 2007 21:35:58 +0200
ffc69736
ui-tree: unify with ui-view, use path to select tree/blob

This teaches ui-tree to show both trees and blobs, thereby making ui-view
superfluous. At the same time, ui-tree is extended to honour the specified
path instead of requiering a tree/blob sha1.
Lars Hjemli hjemli@gmail.com
Sat, 16 Jun 2007 20:20:42 +0200
849f0f0f
cgit.css: make it validate

This fixes a few validation-issues in the css.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 07 Jun 2007 00:43:07 +0200
c83db796
ui-diff: close td/tr/table properly

The previous commit fixed the diff-view when two trees where specified on
the querystring (sha1/sha2) but made the generated html invalid when only
a commit sha1 is specified. This fixes it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 06 Jun 2007 23:02:40 +0200
4a6201e3
ui-diff: emit table/tr/td at better locations

This fixes a bug which made the diff-link for each parent of a commit
output a diff without correct styles.

It also adds an error-message if the head commit specified on the querystring
isn't a valid commit object.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 05 Jun 2007 11:44:47 +0200
51a960a3
Implemented configurable HEAD shortlog on summary page.

This mirrors similiar functionality in gitweb. After clicking on
project on projectlist you will immediatelly see quick summary
of last N commits on HEAD.

[lh: changed from HEAD to cgit_query_head]

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 03:33:41 +0200
6130231e
Check for NULL commit buffer in cgit_parse_commit()

This can be NULL, so try not to segfault.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 03:27:49 +0200
a922615d
Add option to disable pager to cgit_print_log().

This is needed for upcomming shortlog on summary page
patch.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 03:26:14 +0200
3ce6fc16
Handle single-line and empty commit subjects

If commit object ends with \0 after subject line, then info->subject
was not set.

This commit fixes this and also sets subject to ** empty ** if it
would otherwise be empty, so that there is something to click on.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 02:19:38 +0200
1a63cfcc
Use &amp; instead of & in URLs.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 01:15:10 +0200
0928d882
Fixed unexpected tags in html output.

At least those that were catched by tidy.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Ondrej Jirman ondrej.jirman@zonio.net
Sat, 26 May 2007 01:14:25 +0200
2a09c0d1
cgit v0.5

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 24 May 2007 00:18:16 +0200
7dc99a4b
Bad html: it's nice to add alt-attributes

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 24 May 2007 00:08:36 +0200
ef473df0
Bad html: <form> should have an action-attribute

Don't know how the href-attribute got in there...

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 24 May 2007 00:06:25 +0200
62dcc05c
Close a <tr> properly

No reason to generate illegal html.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 24 May 2007 00:02:18 +0200
bbcdc290
Add repo.readme parameter

This parameter can be used to specify a repo-specific includefile, which will
then be printed on the summary page for the repo.

If the parametervalue is a not an absolute path, it is taken to be relative
to repo.path.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 23 May 2007 22:46:54 +0200
25da3f76
Remove unused variable from ui-repolist.c:read_agefile()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 23 May 2007 19:22:20 +0200
57f6a8bf
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>
Lars Hjemli hjemli@gmail.com
Tue, 22 May 2007 23:25:25 +0200
237ef7b0
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>
Lars Hjemli hjemli@gmail.com
Tue, 22 May 2007 23:15:36 +0200
5db39170
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>
Lars Hjemli hjemli@gmail.com
Tue, 22 May 2007 23:08:46 +0200
3b86b44f
css: make column headings bold

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 21 May 2007 00:29:11 +0200
0b8b6a31
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>
Lars Hjemli hjemli@gmail.com
Mon, 21 May 2007 00:14:28 +0200
271ac5a7
Merge branch 'repogroups'

* repogroups:
  Adjust apperance of repogroup headers
  Don't highlight repogroup headings
  Teach cgit how to group repositories by category
Lars Hjemli hjemli@gmail.com
Sun, 20 May 2007 22:13:17 +0200
dc3ac3f7
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
Lars Hjemli hjemli@gmail.com
Sun, 20 May 2007 22:09:55 +0200
977a0b17
Merge branch 'index-header'

* index-header:
  Teach cgit howto include an external file on index page.
  Add html_include()
Lars Hjemli hjemli@gmail.com
Sun, 20 May 2007 14:33:59 +0200
d4dbfdfb
Use git-1.5.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 20 May 2007 13:14:36 +0200
08cc2e5f
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 22:50:11 +0200
e189344a
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 13:55:52 +0200
c1ad6cb7
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 10:45:45 +0200
f4f1339f
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 04:21:06 +0200
d82c08a0
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 03:30:57 +0200
8f6f8c34
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 02:12:06 +0200
72346996
Make git_pageurl handle NULL querystrings

This is suddenly useful after the repo.defbranch-related changes.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 02:06:28 +0200
97de8f05
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 01:38:02 +0200
dff894d1
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 01:16:56 +0200
f9ff7df6
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 00:58:35 +0200
a2ddc104
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 00:26:23 +0200
b28b105e
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>
Lars Hjemli hjemli@gmail.com
Wed, 16 May 2007 00:14:51 +0200
47a81c77
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 23:28:40 +0200
ad3b39d3
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 18:38:31 +0200
c94afaac
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 09:27:27 +0200
e903011c
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 02:13:11 +0200
cfd2aa07
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 01:05:39 +0200
ea2831f1
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 00:48:31 +0200
6fb7d09f
ui-shared.c: fix whitespace breakage

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 00:22:03 +0200
495e3967
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>
Lars Hjemli hjemli@gmail.com
Tue, 15 May 2007 00:07:37 +0200
9927e63f
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 23:58:29 +0200
5ec6e02b
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 23:40:33 +0200
9ecde656
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 23:09:49 +0200
5b94c96a
cgit.c: fix whitespace breakage
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 22:58:01 +0200
a342ac6b
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 18:31:05 +0200
a1a0cd8b
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 18:08:03 +0200
9fb53af2
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>
Lars Hjemli hjemli@gmail.com
Mon, 14 May 2007 11:10:59 +0200
4fdf571c
cgit v0.4

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 23:28:19 +0200
6a8749d3
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 23:13:12 +0200
8a3685bc
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 22:25:14 +0200
c6cf3a42
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 17:15:06 +0200
80e577c3
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 17:03:27 +0200
38a0f9cd
Simplify ui-diff.c using the new file-level diff interface

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 14:21:46 +0200
c4ef6679
Add standard interface for file diff functions

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 14:21:19 +0200
48dc0034
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 11:27:46 +0200
ae4c1ee1
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>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 11:26:23 +0200
1b49de3c
Add shared diff-handling functions

This adds a standard interface for tree diffing.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 13 May 2007 11:24:23 +0200
f5af0beb
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>
Lars Hjemli hjemli@gmail.com
Sat, 12 May 2007 00:29:37 +0200
9f48df63
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>
Lars Hjemli hjemli@gmail.com
Fri, 11 May 2007 23:44:42 +0200
f596d10d
Makefile: add support for building w.o. preinstalled git

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 11 May 2007 20:41:14 +0200
dad80d1f
Tag release v0.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 11 May 2007 12:15:44 +0200
5a217ed3
Update README with submodule build info

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 11 May 2007 12:13:15 +0200
ded9393b
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>
Lars Hjemli hjemli@gmail.com
Fri, 11 May 2007 12:12:48 +0200
cc1dbd1b
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>
Lars Hjemli hjemli@gmail.com
Thu, 10 May 2007 11:25:12 +0200
e7434438
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>
Lars Hjemli hjemli@gmail.com
Thu, 10 May 2007 08:50:49 +0200
ca8eb8fc
Add support for downloading single blobs

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 09 May 2007 00:48:09 +0200
7250a154
ui-view: show pathname if specified in querystring

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 08 May 2007 23:52:56 +0200
61c3ca97
Update to libgit 1.5.2-rc2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 08 May 2007 22:40:59 +0200
66cacd05
Layout update
Lars Hjemli hjemli@gmail.com
Sat, 17 Feb 2007 13:46:18 +0100
ac70cb47
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>
Lars Hjemli hjemli@gmail.com
Thu, 08 Feb 2007 14:47:56 +0100
ab2ab95f
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>
Lars Hjemli hjemli@gmail.com
Thu, 08 Feb 2007 13:53:13 +0100
14d360df
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>
Lars Hjemli hjemli@gmail.com
Mon, 05 Feb 2007 00:21:06 +0100
c52e8413
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>
Lars Hjemli hjemli@gmail.com
Sun, 04 Feb 2007 23:57:34 +0100
74b0db95
Update cgitrc template

Make the descriptions more helpfull.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 04 Feb 2007 23:24:08 +0100
8fb2f056
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>
Lars Hjemli hjemli@gmail.com
Sun, 04 Feb 2007 22:55:19 +0100
ce1c7336
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>
Lars Hjemli hjemli@gmail.com
Sat, 03 Feb 2007 15:02:55 +0100
ebd7b0fb
Do not die if tag has no message

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Feb 2007 16:11:41 +0100
bb3e7950
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>
Lars Hjemli hjemli@gmail.com
Sat, 03 Feb 2007 13:08:21 +0100
66414b68
Update README with install/config information

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Jan 2007 13:18:23 +0100
3c388a3b
Add template for /etc/cgitrc

This doubles as documentation of the parameteres :)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Jan 2007 12:52:14 +0100
7dd50c98
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>
Lars Hjemli hjemli@gmail.com
Sun, 28 Jan 2007 12:17:03 +0100
d8b0cca2
Set explicit font size

This might be bad style, but cgit really needed smaller fonts.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 28 Jan 2007 12:01:21 +0100
8596cda7
Change global document layout

Use a document-wide table for the main layout

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
Lars Hjemli larsh@slaptop.hjemli.net
Sun, 28 Jan 2007 11:33:55 +0100
4a9dea5c
Unified install path

Install all files into single directory

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
Lars Hjemli larsh@slaptop.hjemli.net
Sun, 28 Jan 2007 11:31:57 +0100
777faf7e
Cleanup table listings

Make the output for <table class='list'> a bit nicer

Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
Lars Hjemli larsh@slaptop.hjemli.net
Sun, 28 Jan 2007 00:39:26 +0100
447025f6
Enable building with debuginfo

Add -g to CFLAGS when running make with DEBUG=1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 17 Jan 2007 01:13:05 +0100
23734c5a
Extend repo summary with tag list

Show all tags in the repo below the branch list.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 17 Jan 2007 01:10:39 +0100
a69061fd
Add function cgit_parse_tag()

Teach cgit how to extract author info from a tag.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 17 Jan 2007 01:09:51 +0100
06c81d6f
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>
Lars Hjemli hjemli@gmail.com
Wed, 17 Jan 2007 01:07:31 +0100
66091f93
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.
Lars Hjemli hjemli@gmail.com
Tue, 16 Jan 2007 18:41:01 +0100
5cd2bf7e
WIP: add paths/backlinks to tree/blobview
Lars Hjemli hjemli@gmail.com
Fri, 12 Jan 2007 00:46:17 +0100
2c2047ff
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>
Lars Hjemli hjemli@gmail.com
Fri, 12 Jan 2007 00:24:35 +0100
83a5f35a
Move cache_prepare() to cgit

This moves some cgit-specific stuff away from cache.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 12 Jan 2007 00:00:15 +0100
f98e7268
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)>
Lars Hjemli larsh@hal-2004.(none)
Fri, 05 Jan 2007 18:20:23 +0100
a6a11125
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)>
Lars Hjemli larsh@hal-2004.(none)
Fri, 05 Jan 2007 18:18:58 +0100
52e605ca
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)>
Lars Hjemli larsh@hal-2004.(none)
Thu, 04 Jan 2007 16:53:03 +0100
05b13194
Handle '+' in querystring

Translate '+' to ' ' in querystring parser (still doesn't handle %xx)

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 28 Dec 2006 02:51:46 +0100
732d68d2
Add basic log filtering

This enables case-insensitive grep on logentris using the new search box

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 28 Dec 2006 02:45:28 +0100
e39d738c
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>
Lars Hjemli hjemli@gmail.com
Thu, 28 Dec 2006 02:01:49 +0100
27cd3b2a
Test for NULL-pointers in html_txt() and friends

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 28 Dec 2006 01:54:43 +0100
c43f1246
Minor style fixes

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 22 Dec 2006 01:44:32 +0100
2efee09a
Add missing diff-link in ui-commit.c

Gaah.

This should have been a part of 36aba00273e7af1b94bf8c5dd5068709d983d01e

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 22 Dec 2006 01:38:37 +0100
9d8d9b61
Only show first 80 characters of commit subject in log and summary

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 22 Dec 2006 00:58:18 +0100
378cae63
Add missing ttl-options in config

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 22 Dec 2006 00:56:02 +0100
8e495b07
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>
Lars Hjemli hjemli@gmail.com
Thu, 21 Dec 2006 00:53:03 +0100
40dea525
Let make know that ui-diff.c depends on xdiff.h

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 21 Dec 2006 00:47:05 +0100
36aba002
Add basic diff view

Finally, xdiff is used to show per-file diffs via commit view.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 20 Dec 2006 22:48:27 +0100
a5304286
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>
Lars Hjemli hjemli@gmail.com
Sun, 17 Dec 2006 23:55:53 +0100
fb6e5869
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>
Lars Hjemli hjemli@gmail.com
Sun, 17 Dec 2006 23:30:55 +0100
6cb326c8
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>
Lars Hjemli hjemli@gmail.com
Sun, 17 Dec 2006 23:07:28 +0100
9c5229ea
Reformat code to avoid excessive line lengths

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 19:35:31 +0100
aaa24bdd
Add cgit_free_commitinfo() and use where needed

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 14:58:20 +0100
fa82b03e
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>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 14:46:05 +0100
8960d267
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>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 14:28:26 +0100
77078ba7
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>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 14:25:41 +0100
7c849d94
Allow relative paths for cgit_cache_root

Make sure we chdir(2) back to the original getcwd(2) when a page
has been generated. Also, if the cgit_cache_root do not exist,
try to create it.

This is a feature intended to ease testing/debugging.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 13:55:58 +0100
61245ad1
Add cache-root option to /cgit/rc

Somehow, this option was forgotten when parsing the configfile.

Add it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 13:43:01 +0100
521dc7a4
Add argument parsing + switch for uncached operation

This adds support for the following options to cgit:
  --root=<path>
  --cache=<path>
  --nocache
  --query=<querystring>
  --repo=<reponame>
  --page=<pagename>
  --head=<branchname>
  --sha1=<sha1>
  --ofs=<number>

On startup, /etc/cgitrc is parsed, followed by argument parsing and
finally querystring parsing.

If --nocache is specified (or set in /etc/gitrc), caching is disabled and
cgit instead generates pages to stdout.

The combined effect of these two changes makes testing/debugging a lot
less painfull.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 13:33:32 +0100
a1a79998
Add head comment to shared.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 01:14:01 +0100
6c14f5e4
Add head comment to ui-commit.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 01:11:55 +0100
f516218d
gitweb ripoff: set tr:hover to highligt current row

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 01:00:12 +0100
0de2055b
Make repo header a link to summary page

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 00:49:37 +0100
148fb962
Move cgit_print_date into ui-shared, reuse in ui-summary

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 00:33:28 +0100
9a8f8865
Add ui-commit.c + misc ui cleanups

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 16 Dec 2006 00:19:56 +0100
2101e26f
Add a common commit parser

Make a better commit parser, replacing the ugly one in ui-log.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 15 Dec 2006 18:17:36 +0100
420712ac
Add simple pager to log page

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 14 Dec 2006 00:40:34 +0100
c45b8178
Add separate makefile-rule to clear current cache

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 13 Dec 2006 14:39:41 +0100
dcef257d
Remove implementation details from README

Let README describe the "bigger picture" instead.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 13 Dec 2006 02:06:29 +0100
9c2e863e
Small layout adjustments to summary and blob view

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 13 Dec 2006 00:36:22 +0100
06fe0c2f
Add display of tree content w/ui-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 13 Dec 2006 00:13:27 +0100
58d04f65
cache_lock: do xstrdup/free on lockfile

Since fmt() uses 8 alternating static buffers, and cache_lock might call
cache_create_dirs() multiple times, which in turn might call fmt() twice,
after four iterations lockfile would be overwritten by a cachedirectory
path.

In worst case, this could cause the cachedirectory to be unlinked and replaced
by a cachefile.

Fix: use xstrdup() on the result from fmt() before assigning to lockfile, and
call free(lockfile) before exit.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 12 Dec 2006 10:16:41 +0100
fbaf1171
Don't truncate valid cachefiles

An embarrassing thinko in cgit_check_cache() would truncate valid cachefiles
in the following situation:
  1) process A notices a missing/expired cachefile
  2) process B gets scheduled, locks, fills and unlocks the cachefile
  3) process A gets scheduled, locks the cachefile, notices that the cachefile
     now exist/is not expired anymore, and continues to overwrite it with an
     empty lockfile.

Thanks to Linus for noticing (again).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 22:53:50 +0100
44923f89
Move global variables + callback functions into shared.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 17:25:41 +0100
df631193
Move functions for generic object output into ui-view.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 17:12:26 +0100
d14c5f6d
Move log-functions into ui-log.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 17:04:19 +0100
1418034e
Move repo summary functions into ui-summary.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 16:55:07 +0100
74620f12
Move functions for repolist output into ui-repolist.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 16:48:03 +0100
5a106eb0
Move common output-functions into ui-shared.c

While at it, replace the cgit_[lib_]error constants with a proper function

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 16:38:30 +0100
51ada4fd
Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 16:11:40 +0100
318d1063
Avoid infinite loops in caching layer

Add a global variable, cgit_max_lock_attemps, to avoid the possibility of
infinite loops when failing to acquire a lockfile. This could happen on
broken setups or under crazy server load.

Incidentally, this also fixes a lurking bug in cache_lock() where an
uninitialized returnvalue was used.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 12:10:12 +0100
a581ed8d
Let 'make install' clear all cachefiles

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 11:23:05 +0100
f5069d88
Fix cache algorithm loophole

This closes the door for unneccessary calls to cgit_fill_cache().

Noticed by Linus.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 11 Dec 2006 09:57:58 +0100
76827d86
Add version identifier in generated files

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 10 Dec 2006 23:50:16 +0100
7640d90b
Add license file and copyright notices

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 10 Dec 2006 22:41:14 +0100
25105d7e
Add caching infrastructure

This enables internal caching of page output.

Page requests are split into four groups:
  1) repo listing (front page)
  2) repo summary
  3) repo pages w/symbolic references in query string
  4) repo pages w/constant sha1's in query string

Each group has a TTL specified in minutes. When a page is requested, a cached
filename is stat(2)'ed and st_mtime is compared to time(2). If TTL has expired
(or the file didn't exist), the cached file is regenerated.

When generating a cached file, locking is used to avoid parallell processing
of the request. If multiple processes tries to aquire the same lock, the ones
who fail to get the lock serves the (expired) cached file. If the cached file
don't exist, the process instead calls sched_yield(2) before restarting the
request processing.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 10 Dec 2006 22:31:36 +0100
856c026e
Add .gitignore

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 09 Dec 2006 22:21:43 +0100
c76a52be
Replace useless make rules with generic $(OBJECTS) dependency

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 09 Dec 2006 15:29:05 +0100
0d169ada
Import cgit prototype from git tree

This enables basic cgit functionality, using libgit.a and xdiff/lib.a from
git + a custom "git.h" + openssl for sha1 routines.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 09 Dec 2006 15:18:17 +0100
de69ce02
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>
Lars Hjemli hjemli@gmail.com
Sat, 19 May 2007 00:00:25 +0200
5e75128a
Add html_include()

This is a function used to include external htmlfiles in cgit-
generated pages.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 23:56:10 +0200
3de63b26
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 13:06:45 +0200
72fa5c63
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 03:54:15 +0200
30ccdcaa
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 03:00:54 +0200
43d40f2b
Add lookup-function for valid repo commands

This will be usefull when parsing url arguments.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 00:50:46 +0200
305414df
Move cgit_get_repoinfo into shared.c

This function will be usefull when parsing url arguments.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 00:47:47 +0200
7b39144a
Adjust apperance of repogroup headers

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 20 May 2007 22:12:54 +0200
2aef89e5
Don't highlight repogroup headings

Specify class='nohover' to avoid highlighting this row.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 23:17:09 +0200
5877c49f
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>
Lars Hjemli hjemli@gmail.com
Fri, 18 May 2007 22:48:22 +0200
103940fe
Add ofs argument to cgit_log_link and use it in ui-log.c

This fixes a bug in the prev/next links on the log page: when on the default
branch the links to prev/next page would contain h=(null).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 29 Jun 2007 20:27:41 +0200
382805ee
Add trim_end() and use it to remove trailing slashes from repo paths

The new function removes all trailing instances of an arbitrary character
from a copy of the supplied char array. This is then used to remove any
trailing slashes from cgit_query_path.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 26 Jun 2007 18:04:31 +0200
42e459bb
Do not include current path in the "tree" menu link

When generating the menu links on repo pages the tree link included the
current path. This made the link pretty useless whenever the current path
was set so this commit just passes NULL instead.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 26 Jun 2007 17:32:03 +0200
0d05bca5
Add setting to enable/disable extra links on index page

The summary/log/tree links displayed for each repository on the index
page lost some of their purpose when the header menu was added, so this
commit introduces the parameter 'enable-index-links' which must be set
to 1 to enable these links.

Suggested-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 19 Jun 2007 00:56:40 +0200
a215bf46
Change S/L/T to summary/log/tree

In yet another attempt at better usability, the cryptic S/L/T links are
changed to show their full name.

Suggested-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 18 Jun 2007 22:12:09 +0200
1f34fb9d
Change "files" to "tree"

This renames the menu link and the shortcut on the repo index page from
the strange "files" to the more gittish "tree".

Suggested-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 18 Jun 2007 22:06:00 +0200
7d6ee4ee
Include querystring as part of cached filename for repo summary page

When adding support for the h parameter to the summary page (passing current
branch between pages), the builtin cache returned basically random results
for summary page since the cached filename didn't honour the querystring.

This fixes the issue for now, but someday it might be worthwhile to generate
'canonical' filenames in the cache for all pages, i.e. something a bit more
clever than just including the querystring.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 18 Jun 2007 21:17:24 +0200
b8be028a
Add more menuitems on repo pages

In an attempt to get better usability, a set of 'semistatic' menuitems
are added to the page header on all pages except the repository index.

The menuitems (summary, log, files, commit and diff) honours the current
branch and revision. To switch the current branch one can use the branch
links on the summary page.

The backlink to the repository index page is now available by clicking
the static page heading.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 18 Jun 2007 00:18:42 +0200
d6b01dac
link raw blob from tree file view

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 19:51:47 +0200
bbd4a144
fix: changed view link to blob in summary.

 might not be the best way, but should suffice for now that view command isn't
 handled in any way

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 19:35:39 +0200
dc3c9b5b
allow selective enabling of snapshots

 snapshot configuration parameter now can be a
 space/slash/comma/colon/semicolon/pipe-separated list of snaphot suffixes as
 listed in ui-snapshot.c

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 18:00:53 +0200
97c025ae
shorten snapshot names to repo basename

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 15:29:55 +0200
1cb8bedf
introduce cgit_repobasename

 that shortens reponame stripping any directories and .git suffixes, that is
 turning 'dir/repo.git/' or 'dir/repo/.git/' or alikes into mere 'repo'.

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 15:24:07 +0200
0df096f6
added snapshot filename to the link

 - changed cgit_pageurl into cgit_fileurl with the filename parameter
 - rewritten cgit_pageurl as a wrapper around cgit_fileurl

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 13:13:40 +0200
86ca0223
add plain uncompressed tar snapshort format

time to make available snapshots selectable

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 02:14:35 +0200
18a99bdf
introduced .tar.bz2 snapshots

 - reworked write_tar_gzip_archive to handle arbitrary filter as a
   write_compressed_tar_archive
 - reformatted whitespaces in the said function to adhere to common cgit
   standards
 - added wrappers around write_compressed_tar_archive for .tar.gz and .tar.bz2
 - added a hint for vim to use 8 characters shift width by default

Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 02:05:34 +0200
4a92cbb7
compress .tar.gz using gzip as a filter
Michael Krelin hacker@klever.net
Fri, 20 Jul 2007 20:58:23 +0200
127f43d4
added a chk_non_negative check
Michael Krelin hacker@klever.net
Fri, 20 Jul 2007 20:56:43 +0200
3aae8270
css: adjust vertical-align of commit info th cells
Michael Krelin hacker@klever.net
Wed, 18 Jul 2007 14:55:40 +0200
f97c707a
add support for snapshot tarballs
- reworked cgit_print_snapshot to use a list of supported archivers and pick
	one for the suffix supplied
- moved printing of snaphot links into ui-snapshot and make it iterate through
	the said list
Michael Krelin hacker@klever.net
Wed, 18 Jul 2007 14:40:03 +0200
e651cb0d
Rename dirlink to gitlink.

Git changed from dirlink to gitlink in
302b9282c9ddfcc704ca759bdc98c1d5f75eba2f.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Jeffrey C. Ollie jeff@ocjtech.us
Mon, 04 Jun 2007 12:28:56 -0500
2e3b6fc4
Use git-1.5.3.3
Lars Hjemli hjemli@gmail.com
Mon, 01 Oct 2007 12:50:07 +0200
fd39489f
correct typo in CSS
Michael Krelin hacker@klever.net
Fri, 05 Oct 2007 00:21:30 +0200
13d2b0b2
Skip unknown header fields when parsing tags and commits

Both the commit- and tagparser failed to handle unexpected header fields.
This adds futureproofing by simply skipping any header we don't know/care
about.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 24 Oct 2007 21:14:44 +0200
ac1f493b
Add links to the new refs page from summary page

If either branches or tags are filtered on the summary page, add a link to
refs/heads and/or refs/tags right below the last branch/tag.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:47:44 +0200
7937d060
Add support for refs view

This enables the new urls $repo/refs, $repo/refs/heads and $repo/refs/tags,
which can be used to print _all_ branches and/or tags.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:36:53 +0200
8efb05f9
Make cgit_print_branches()/cgit_print_tags() external

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:25:40 +0200
6bce91be
Add descriptions of summary-branches and summary-tags to cgitrc

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:15:54 +0200
763a6a09
Add support for config param summary-branches

This parameter can be used to specify max number of branches to show
on the summary page (if not all branches will be displayed, the "most
idle" branches are the ones to be pruned). The default value for this
parameter is 0, which disables the pruning.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:13:42 +0200
f6310fec
Move logic for age comparision from cmp_tag_age into cmp_age()

Simple refactoring to enable later filtering of branches based on age.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 10:06:03 +0200
fe211c7e
Add support for config param summary-tags

This parameter can be used to specify max number of tags to show on
the summary page. If not specified, all tags are printed.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 25 Oct 2007 10:40:16 +0200
ef1cc6ef
Sort tags by age

This adds a function to compare timestamps and then uses it as callback
for qsort() before printing out tags.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 25 Oct 2007 20:33:04 +0200
502d7107
Use reflist to print tag info

This updates ui-summary.c to use a reflist instead of for_each_tag_ref(),
as a step towards more flexible tag handling (filtering/sorting).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 25 Oct 2007 10:28:15 +0200
0c1ebce2
Use reflist to print branch info

This updates ui-summary.c to use a reflist instead of for_each_branch_ref(),
as a step towards more flexible branch handling (filtering/sorting).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 25 Oct 2007 10:13:25 +0200
e397ff70
Add functions and types for ref lists

This adds two structs, refinfo and reflist, and functions for building
a list of refs.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 25 Oct 2007 09:30:06 +0200
c61360fe
cgit_parse_commit(): Add missing call to xstrdup()

It's rather silly to point into random memory-locations. Also, remove a
call to strdup() used on a literal char *.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 27 Oct 2007 13:50:18 +0200
a2ebbd69
Use utf8::reencode_string from git

This replaces the iconv-support in cgit with similar functions already
existing in git.

Signed-off-by: Lars Hjemli <hjemli@gmai.com>
Lars Hjemli hjemli@gmail.com
Mon, 05 Nov 2007 22:27:43 +0100
7858a309
Convert subject and message with iconv_msg.
Jonathan Bastien-Filiatrault joe@x2a.org
Fri, 26 Oct 2007 18:13:41 -0400
af081983
Add iconv_msg function.
Jonathan Bastien-Filiatrault joe@x2a.org
Fri, 26 Oct 2007 18:11:26 -0400
aa5cc328
Set msg_encoding according to the header.
Jonathan Bastien-Filiatrault joe@x2a.org
Fri, 26 Oct 2007 18:10:26 -0400
3845e177
Add commit->msg_encoding, allocate msg dynamicly.
Jonathan Bastien-Filiatrault joe@x2a.org
Fri, 26 Oct 2007 18:09:06 -0400
c188c482
Support "/" as virtual-root

When the virtual-root was a single "/", it would be normalized to NULL due
to removal of trailing slashes, which in turn would fool us to belive that
we shouldn't generate virtual urls.

This makes the "/" normalize to "", effectively allowing virtual urls like
http://example.com/projectname to be generated without specifying the
full domain name as the virtual root.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 08 Nov 2007 12:20:05 +0100
2919b91d
CGIT 0.7.1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 09 Nov 2007 13:51:00 +0100
9b18632b
Makefile install: include cgit.png, do not empty cache

The cache-cleaning is potentially dangerous, so lets move it away from the
install target. A special emptycache target can be used to run the rm -rf.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Fri, 09 Nov 2007 13:47:58 +0100
2ff33a8a
Set commit date on snapshot contents

The testsuite revealed that cgit snapshots don't set any useful timestamp on
the files contained in the snapshot.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 13:14:15 +0100
2915483e
Fix html error detected by test-suite

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 13:04:28 +0100
b4649fc9
Create initial testsuite

This creates a simple testsuite, heavily inspired by the testsuite in git.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 00:40:58 +0100
fc4c4ba3
Handle missing timestamp in commit/tag objects

When a commit or tag lacks author/committer/tagger timestamp, do not skip
the next line in the commit/tag object.

Also, do not bother to print timestamps with value 0 as it is close to certain
to be bogus.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 02 Dec 2007 22:11:35 +0100
5b75064a
Set commit date on snapshot contents

The testsuite revealed that cgit snapshots don't set any useful timestamp on
the files contained in the snapshot.

Cherry-picked-from: 2ff33a8a0405b420cd75e0e207c7efeecd6f130b
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 11 Nov 2007 13:14:15 +0100
b74cc915
CGIT 0.7.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Thu, 10 Jan 2008 13:50:22 +0100
edf0ae3b
Use GIT-1.5.3.8
Lars Hjemli hjemli@gmail.com
Thu, 10 Jan 2008 13:47:18 +0100
2216fd64
Compare string lengths when parsing the snapshot mask

We used to rely on the result from strncmp() without comparing the length of
the strings involved. Even worse, any single-character format specifier would
enable zip-format due to the optional '.'-prefix since the length of the
mask then would become zero.

Noticed-by: Evan Martin <sys@neugierig.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Mon, 03 Dec 2007 00:39:20 +0100
7b346647
Default repo description to "[no description]"

Otherwise, when you leave out a description for a repository, the NULL
default causes cgit to print out titles like "cgit - (null)".

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Evan Martin martine@xen.localdomain
Sun, 02 Dec 2007 14:39:30 -0800