]> git.cameronkatri.com Git - cgit.git/log
cgit.git
16 years agoMerge branch 'stable'
Lars Hjemli [Mon, 12 Jan 2009 07:57:23 +0000 (08:57 +0100)]
Merge branch 'stable'

16 years agoMakefile: install cgit.{css,png} in CGIT_DATA_PATH
Todd Zullinger [Sun, 11 Jan 2009 23:23:59 +0000 (18:23 -0500)]
Makefile: install cgit.{css,png} in CGIT_DATA_PATH

CGIT_DATA_PATH defaults to CGIT_SCRIPT_PATH, but allows users to
install the cgi and the data files in different locations.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMakefile: add INSTALL var to set install command
Todd Zullinger [Sun, 11 Jan 2009 23:23:52 +0000 (18:23 -0500)]
Makefile: add INSTALL var to set install command

This also explicitly sets the modes for installed files (755 for the
.cgi, 644 for the .css and .png).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoFix tar.bz2 snapshot example
Todd Zullinger [Sun, 11 Jan 2009 23:23:39 +0000 (18:23 -0500)]
Fix tar.bz2 snapshot example

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Sun, 11 Jan 2009 21:00:25 +0000 (22:00 +0100)]
Merge branch 'stable'

16 years agoAvoid SEGFAULT on invalid requests
Lars Hjemli [Sun, 11 Jan 2009 20:23:04 +0000 (21:23 +0100)]
Avoid SEGFAULT on invalid requests

When an unknown page is requested, either on the querystring or via
PATH_INFO, we end up with a null-referencing cgit_cmd. This null-
pointer is then used as argument to the hc() function (which decides
what tab to render as 'active'), but this function failed to check if a
valid cmd was specified and a SEGFAULT would occur. This patch fixes the
issue by introducing a 'fallback-cmd' which specifies what tab to render
as 'active' when no valid cmd is requested.

While at it, we now also keep track of the active repository even if an
invalid cmd was requested since we want to show the error message about
the invalid request in the correct context.

Noticed-by: Robin Redeker <elmex@ta-sa.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMake all tags viewable
Robin Redeker [Sun, 11 Jan 2009 15:25:01 +0000 (16:25 +0100)]
Make all tags viewable

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Sun, 11 Jan 2009 15:38:19 +0000 (16:38 +0100)]
Merge branch 'stable'

16 years agoui-tag: escape tagnames properly
Lars Hjemli [Sun, 11 Jan 2009 15:37:47 +0000 (16:37 +0100)]
ui-tag: escape tagnames properly

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoChange toggle to more meaningful term
Justin Waters [Fri, 9 Jan 2009 22:35:10 +0000 (17:35 -0500)]
Change toggle to more meaningful term

In the log interface, there is a toggle link at the top, but it isn't clear
what's being toggled.  I've changed it to "Expand" and "Collapse" to make it
clear that you are getting more and less information, respectively.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
16 years agoMerge branch 'snapshot-fixes'
Lars Hjemli [Sun, 11 Jan 2009 11:22:46 +0000 (12:22 +0100)]
Merge branch 'snapshot-fixes'

16 years agoMerge branch 'lh/mimetypes'
Lars Hjemli [Sun, 11 Jan 2009 11:22:31 +0000 (12:22 +0100)]
Merge branch 'lh/mimetypes'

16 years agoMerge branch 'lh/virtual-root'
Lars Hjemli [Sun, 11 Jan 2009 11:22:19 +0000 (12:22 +0100)]
Merge branch 'lh/virtual-root'

16 years agoMerge branch 'stable'
Lars Hjemli [Sun, 11 Jan 2009 11:18:25 +0000 (12:18 +0100)]
Merge branch 'stable'

16 years agoui-log: show name-decorations in log output
Lars Hjemli [Sun, 11 Jan 2009 11:16:18 +0000 (12:16 +0100)]
ui-log: show name-decorations in log output

Commits are now decorated with a clickable 'label' for each ref pointing
at it, similar to how gitweb and gitk displays commit decorations.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMakefile: avoid libcurl when building git
Lars Hjemli [Sat, 10 Jan 2009 14:18:18 +0000 (15:18 +0100)]
Makefile: avoid libcurl when building git

We don't need support for fetching/pushing in libgit.a, hence we don't need
to link with libcurl.

Noticed-by: Robin Redeker <elmex@ta-sa.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-refs: avoid SEGFAULT on lightweight tags
Robin Redeker [Sat, 10 Jan 2009 11:44:08 +0000 (12:44 +0100)]
ui-refs: avoid SEGFAULT on lightweight tags

Signed-off-by: Robin Redeker <elmex@ta-sa.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Tue, 6 Jan 2009 20:51:09 +0000 (21:51 +0100)]
Merge branch 'stable'

16 years agoui-tree.c: do not add blank line when displaying blobs
Lars Hjemli [Tue, 6 Jan 2009 20:37:23 +0000 (21:37 +0100)]
ui-tree.c: do not add blank line when displaying blobs

Also, fix a related bug in the test-suite.

Noticed-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Tue, 30 Dec 2008 11:29:50 +0000 (12:29 +0100)]
Merge branch 'stable'

16 years agoui-patch: whitespace changes in the patch generation code
Tomas Carnecky [Tue, 30 Dec 2008 10:14:52 +0000 (11:14 +0100)]
ui-patch: whitespace changes in the patch generation code

Add a space between the committer name and email, and remove
superfluous spaces in the date header.

This makes cgit-generated patches match the output from git-format-patch
almost exactly, at least as far as the email headers go.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agotests/t0107-snapshot.sh: make testscript match updated snapshot behavior
Lars Hjemli [Sun, 28 Dec 2008 09:52:35 +0000 (10:52 +0100)]
tests/t0107-snapshot.sh: make testscript match updated snapshot behavior

Since cgit now returns a 404 error when the snapshot filename cannot be
resolved to a commit object, the testscript needs to request a valid
snapshot name.

Also, the script assumed that the toplevel directory in the snapshot
would get the name of the repository but it's now named similar to
the requested snapshot.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoreturn 404 if snapshot is not found
Natanael Copa [Tue, 2 Dec 2008 10:31:34 +0000 (11:31 +0100)]
return 404 if snapshot is not found

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-snapshot.c: change mime-type for tar.gz and tar.bz2
Lars Hjemli [Fri, 26 Dec 2008 10:33:59 +0000 (11:33 +0100)]
ui-snapshot.c: change mime-type for tar.gz and tar.bz2

The updated mime-types seems to work better than the old ones with both
safari and firefox.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoUse GIT-1.6.1
Lars Hjemli [Fri, 26 Dec 2008 10:03:01 +0000 (11:03 +0100)]
Use GIT-1.6.1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoshared.c: future-proof usage of git diff-structures
Lars Hjemli [Fri, 26 Dec 2008 10:02:02 +0000 (11:02 +0100)]
shared.c: future-proof usage of git diff-structures

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoUntie logic for SCRIPT_NAME and PATH_INFO
Lars Hjemli [Fri, 26 Dec 2008 09:33:01 +0000 (10:33 +0100)]
Untie logic for SCRIPT_NAME and PATH_INFO

SCRIPT_NAME is used as fallback for virtual-root when virtual-root is
unspecified in cgitrc and PATH_INFO is used as fallback for the query-
string parameter 'url' when the latter is unspecified. But until now,
the use of PATH_INFO depended on virtual-root also being unspecified,
i.e. it was impossible to use PATH_INFO when virtual-root was specified.

This commit makes the fallback on SCRIPT_NAME and PATH_INFO independent
code paths, i.e. it is now possible to specify virtual-root in cgitrc
while still using PATH_INFO (instead of rewrite rules) to get 'pretty
urls'.

Noticed-by: Jack Moffitt <jack@chesspark.com>
Noticed-by: LiKai Liu <liulk@cs.bu.edu>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Sat, 6 Dec 2008 11:05:21 +0000 (12:05 +0100)]
Merge branch 'stable'

16 years agotests/setup.sh: allow testsuite to fail properly with POSIX standard shells
Lars Hjemli [Sat, 6 Dec 2008 11:03:54 +0000 (12:03 +0100)]
tests/setup.sh: allow testsuite to fail properly with POSIX standard shells

The "((expr))" construct is not implemented by e.g. dash, so this commit
replaces the construct with a more portable one.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agotests/t0010-validate-html.sh: skip tests if 'tidy' is not available
Lars Hjemli [Sat, 6 Dec 2008 10:53:59 +0000 (11:53 +0100)]
tests/t0010-validate-html.sh: skip tests if 'tidy' is not available

Noticed-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'full-log'
Lars Hjemli [Sat, 6 Dec 2008 10:37:37 +0000 (11:37 +0100)]
Merge branch 'full-log'

Conflicts:
cgit.c
cgit.h

16 years agoMerge branch 'lh/sort-repolist'
Lars Hjemli [Sat, 6 Dec 2008 10:35:49 +0000 (11:35 +0100)]
Merge branch 'lh/sort-repolist'

16 years agoMerge branch 'snapshot-fixes'
Lars Hjemli [Sat, 6 Dec 2008 10:34:48 +0000 (11:34 +0100)]
Merge branch 'snapshot-fixes'

16 years agoMerge branch 'stable'
Lars Hjemli [Sat, 6 Dec 2008 10:33:05 +0000 (11:33 +0100)]
Merge branch 'stable'

16 years agoMerge branch 'rj/buildtweaks' into stable
Lars Hjemli [Fri, 5 Dec 2008 18:13:32 +0000 (19:13 +0100)]
Merge branch 'rj/buildtweaks' into stable

16 years agoparsing.c: enable builds with NO_ICONV defined
Lars Hjemli [Fri, 5 Dec 2008 18:10:28 +0000 (19:10 +0100)]
parsing.c: enable builds with NO_ICONV defined

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: avoid build warning for strcasestr(3)
Lars Hjemli [Fri, 5 Dec 2008 18:04:17 +0000 (19:04 +0100)]
ui-repolist: avoid build warning for strcasestr(3)

The non-standard function strcasestr is only defined if _GNU_SOURCE has
also been defined.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMakefile: allow cgit.conf to override platform-specific tweaks
Lars Hjemli [Fri, 5 Dec 2008 17:47:16 +0000 (18:47 +0100)]
Makefile: allow cgit.conf to override platform-specific tweaks

If the makefile doesn't automatically define the correct build variables
it is nice to be able to define them explicitly.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoExtra cygwin-specific changes
Ramsay Jones [Sat, 15 Nov 2008 18:26:32 +0000 (18:26 +0000)]
Extra cygwin-specific changes

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-log: try to disambiguate ref names
Lars Hjemli [Wed, 3 Dec 2008 16:34:23 +0000 (17:34 +0100)]
ui-log: try to disambiguate ref names

The 'h' querystring parameter in cgit is normally used to specify
a branch (i.e. a ref below refs/heads/), but if a repository contains
a tag with the same name as a branch the output from ui-log would use
the tag as start-revision.

This patch tries to fix the issue by checking if the specified ref is
valid as a branch name; if so, the full refname is used in the call
to setup_revisions().

Noticed-by: Takamori Yamaguchi <akschar@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: shorten the sha1 printed by cgit_object_link
Lars Hjemli [Mon, 1 Dec 2008 20:58:59 +0000 (21:58 +0100)]
ui-shared: shorten the sha1 printed by cgit_object_link

Such links was printed as the object type followed by the objects complete
sha1. We still use the complete sha1 in the link but we no longer show it
in all its glory; only the first 10 hex chars are printed.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-refs.c: show download links for all tags referring to commit objects
Lars Hjemli [Mon, 1 Dec 2008 20:56:07 +0000 (21:56 +0100)]
ui-refs.c: show download links for all tags referring to commit objects

The snapshot function has only been linked to from the commit page while
users often would want to download a certain release. With this patch,
direct download links will now be printed for each tagged release on the
repo summary page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: exploit snapshot dwimmery in cgit_print_snapshot_links
Lars Hjemli [Mon, 1 Dec 2008 20:50:19 +0000 (21:50 +0100)]
ui-shared: exploit snapshot dwimmery in cgit_print_snapshot_links

Since we know that ui-snapshot.c is able to extract the revision from the
filename, there's no longer necessary to specify the revision with a 'id'
querystring argument.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-snapshot: improve extraction of revision from snapshot name
Lars Hjemli [Mon, 1 Dec 2008 18:13:44 +0000 (19:13 +0100)]
ui-snapshot: improve extraction of revision from snapshot name

The modified get_ref_from_filename() supports the following snapshot
formats:
* $REV.$EXT
* $REPO[-_]*v?$REV.$EXT

This implies that the following urls will retrieve the expected revision:
* http://hjemli.net/git/cgit/snapshot/v0.8.1.tar.gz
* http://hjemli.net/git/cgit/snapshot/0.8.1.tar.gz
* http://hjemli.net/git/cgit/snapshot/cgit-0.8.1.tar.gz
* http://hjemli.net/git/cgit/snapshot/cgit-140012d7a8.tar.gz

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoSet prefix in snapshots when using dwimmery
Natanael Copa [Sun, 30 Nov 2008 05:49:07 +0000 (21:49 -0800)]
Set prefix in snapshots when using dwimmery

This patch sets the directory prefix in archives to be the filename,
excluding the suffix (.tar.gz, .tar.bz2 etc).

The patch also removes the prefix parameter in cgit_print_snapshot()
as the prefix might differ.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-log: use css to make full-log prettier
Lars Hjemli [Sat, 29 Nov 2008 18:11:26 +0000 (19:11 +0100)]
ui-log: use css to make full-log prettier

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-log: (ab)use extra columns for commit message when showmsg=1
Lars Hjemli [Sat, 29 Nov 2008 17:58:31 +0000 (18:58 +0100)]
ui-log: (ab)use extra columns for commit message when showmsg=1

If the commit message has extra long lines it's better to use the author/
files/lines columns to show those lines than to push the columns of screen
and force the users to hscroll.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-log: add support for showing the full commit message
Lars Hjemli [Sat, 29 Nov 2008 17:39:41 +0000 (18:39 +0100)]
ui-log: add support for showing the full commit message

Some users prefer to see the full message, so to make these users happy
the new querystring parameter "showmsg" can be used to print the full
commit message per log entry.

A link is provided in the log heading to make this function accessible,
and all links and forms tries to preserve the users preference.

Note: the new link is not displayed on the summary page since the point
of the summary page is to be a summary, but it is still obeyed if specified
manually.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: implement lazy caching of repo->mtime
Lars Hjemli [Sat, 29 Nov 2008 15:46:37 +0000 (16:46 +0100)]
ui-repolist: implement lazy caching of repo->mtime

When sorting the list of repositories by their last modification time,
cgit would (in the worst case) invoke fstat(3) four times and open(3)
twice for each callback from qsort(3). This obviously scales very badly.

Now, the calculated modtime for each repo is saved in repo->mtime, thus
keeping the number of stat/open invocations identical for sorted and
unsorted repo-listings.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: sort null values last
Lars Hjemli [Sat, 29 Nov 2008 13:27:35 +0000 (14:27 +0100)]
ui-repolist: sort null values last

When sorting on e.g. owner, it's not interesting to get all repos
without owner at the top of the list.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: add support for sorting any column
Lars Hjemli [Sat, 29 Nov 2008 13:08:51 +0000 (14:08 +0100)]
ui-repolist: add support for sorting any column

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: extract get_repo_modtime() from print_modtime()
Lars Hjemli [Sat, 29 Nov 2008 12:33:02 +0000 (13:33 +0100)]
ui-repolist: extract get_repo_modtime() from print_modtime()

The new function is then used by both print_modtime() and
cgit_reposort_modtime().

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoAdd support for sorting by Age in the repolist
Benjamin Close [Tue, 25 Nov 2008 14:25:35 +0000 (06:25 -0800)]
Add support for sorting by Age in the repolist

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Fri, 14 Nov 2008 08:30:28 +0000 (09:30 +0100)]
Merge branch 'stable'

16 years agoui-repolist: handle empty agefiles
Lars Hjemli [Fri, 14 Nov 2008 08:29:22 +0000 (09:29 +0100)]
ui-repolist: handle empty agefiles

When the agefile was empty the old code would happily reuse the static
buffer filled by a previous call to read_agefile().

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Thu, 6 Nov 2008 19:47:19 +0000 (20:47 +0100)]
Merge branch 'stable'

16 years agoUse mode 0644 for non-executable files
Karl Chen [Wed, 5 Nov 2008 10:45:18 +0000 (02:45 -0800)]
Use mode 0644 for non-executable files

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'stable'
Lars Hjemli [Thu, 6 Nov 2008 18:18:27 +0000 (19:18 +0100)]
Merge branch 'stable'

16 years agoFix tests to work on Ubuntu (dash)
Ramsay Jones [Tue, 4 Nov 2008 19:23:41 +0000 (19:23 +0000)]
Fix tests to work on Ubuntu (dash)

The system shell (/bin/sh) on Ubuntu is dash, which aims to be a
POSIX standard shell.  In particular, dash does not implement any
of the common extensions to the standard that, say, bash and ksh
do.

Replace some non-POSIX constructs in setup.sh with more portable
and mundane code.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoFix some warnings to allow -Werror
Ramsay Jones [Tue, 4 Nov 2008 19:22:08 +0000 (19:22 +0000)]
Fix some warnings to allow -Werror

The type used to declare the st_size field of a 'struct stat' can
be a 32- or 64-bit sized type, which can vary from one platform to
another, or even from one compilation to another.  In particular,
on linux, if you include the following define:

    #define _FILE_OFFSET_BITS 64

prior to including certain system header files, then the type used
for the st_size field will be __off64_t, otherwise it will be an
__off_t.  Note that the above define is included at the top of
git-compat-util.h.

In cache.c, the "%zd" format specifier expects a "signed size_t",
another type which can vary, when an __off64_t or a __off_t is
provided.  To supress the warning, use the PRIuMAX format specifier
and cast the st_size field to uintmax_t.  This should work an any
platform for which git currently compiles.

In ui-plain.c, the size parameter of sha1_object_info() and
read_sha1_file() is defined to be "unsigned long *" not "size_t *".
So, to supress the warning, simply declare size with the correct type.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoUse GIT-1.6.0.3
Lars Hjemli [Thu, 6 Nov 2008 18:13:21 +0000 (19:13 +0100)]
Use GIT-1.6.0.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoCGIT 0.8.1 v0.8.1
Lars Hjemli [Sat, 11 Oct 2008 18:22:57 +0000 (20:22 +0200)]
CGIT 0.8.1

16 years agoMerge branch 'stable'
Lars Hjemli [Sat, 11 Oct 2008 18:21:17 +0000 (20:21 +0200)]
Merge branch 'stable'

* stable:
  Makefile: enable compilation on uclibc

16 years agoMakefile: enable compilation on uclibc
Lars Hjemli [Sat, 11 Oct 2008 18:21:06 +0000 (20:21 +0200)]
Makefile: enable compilation on uclibc

Original-patch-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-snapshot: add dwimmery
Lars Hjemli [Sat, 11 Oct 2008 18:09:42 +0000 (20:09 +0200)]
ui-snapshot: add dwimmery

When downloading a snapshot, the snapshot name will often contain the repo
name combined with a tag. This patch tries to exploit this so that the
correct revision is downloaded even if no specific revision is specified.

PS: this only occurs if neither 'h' nor 'id' is specified in the query-
string.

PPS: this also fixes a bug which occurs when trying to download a filename
with an unsupported suffix: it used to try to print an error message to
the user but failed since it didn't prepare the output properly.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoAdd cgit_query.nohead flag
Lars Hjemli [Sat, 11 Oct 2008 17:05:50 +0000 (19:05 +0200)]
Add cgit_query.nohead flag

This flag is set when no HEAD is specified in the querystring. Currently
it has no users, but it will be used by ui-snapshot to invoke a DWIM-mode
where the revision is extracted from the snapshot name.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: specify correct css class for summary tab
Lars Hjemli [Mon, 6 Oct 2008 14:00:42 +0000 (16:00 +0200)]
ui-shared: specify correct css class for summary tab

When introducing cgit_summary_link() in 49ecbbdd I forgot to specify the
css class. This fixes it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoCGIT 0.8 v0.8
Lars Hjemli [Sun, 5 Oct 2008 19:23:39 +0000 (21:23 +0200)]
CGIT 0.8

16 years agoui-summary: use html_url_path()
Lars Hjemli [Sun, 5 Oct 2008 19:21:42 +0000 (21:21 +0200)]
ui-summary: use html_url_path()

This makes the clone urls be properly escaped.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-refs: use cgit_tag_link()
Lars Hjemli [Sun, 5 Oct 2008 19:19:05 +0000 (21:19 +0200)]
ui-refs: use cgit_tag_link()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: add cgit_tag_link()
Lars Hjemli [Sun, 5 Oct 2008 19:18:45 +0000 (21:18 +0200)]
ui-shared: add cgit_tag_link()

This function can be used to generate properly escaped links to the tag
page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: generate proper links in cgit_object_link()
Lars Hjemli [Sun, 5 Oct 2008 19:12:08 +0000 (21:12 +0200)]
ui-shared: generate proper links in cgit_object_link()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: use html_url_path() to get properly escaped url in form action
Lars Hjemli [Sun, 5 Oct 2008 17:25:47 +0000 (19:25 +0200)]
ui-shared: use html_url_path() to get properly escaped url in form action

When a repo uses an url with e.g. '#' or '?' characters this needs to be
properly escaped when used as action in a form tag.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoUse GIT-1.6.0.2
Lars Hjemli [Sun, 5 Oct 2008 17:19:59 +0000 (19:19 +0200)]
Use GIT-1.6.0.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: reword the standard page footer
Lars Hjemli [Sun, 5 Oct 2008 17:09:58 +0000 (19:09 +0200)]
ui-shared: reword the standard page footer

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared: do not print repo name on the "summary" tab
Lars Hjemli [Sun, 5 Oct 2008 17:00:32 +0000 (19:00 +0200)]
ui-shared: do not print repo name on the "summary" tab

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoReplace cgitrc with cgitrc.5.txt
Lars Hjemli [Sun, 5 Oct 2008 16:55:49 +0000 (18:55 +0200)]
Replace cgitrc with cgitrc.5.txt

The new file describes all cgitrc options in a more structured manner then
the cgitrc example file and it might also work as the source for a cgitrc
man page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'lh/escape-urls'
Lars Hjemli [Sun, 5 Oct 2008 15:16:48 +0000 (17:16 +0200)]
Merge branch 'lh/escape-urls'

* lh/escape-urls:
  ui-repolist + ui-shared: Use cgit_summary_link()
  ui-shared.c: add cgit_summary_link()
  ui-shared.c: use html_url_path() in repolink()
  html.c: add html_url_path

16 years agoui-repolist + ui-shared: Use cgit_summary_link()
Lars Hjemli [Sun, 5 Oct 2008 15:16:36 +0000 (17:16 +0200)]
ui-repolist + ui-shared: Use cgit_summary_link()

This makes is possible to use cgit with repository urls containing special
url characters like '#' and '?'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared.c: add cgit_summary_link()
Lars Hjemli [Sun, 5 Oct 2008 14:55:50 +0000 (16:55 +0200)]
ui-shared.c: add cgit_summary_link()

This function can be used to generate a link to the summary page for the
currently active repo.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared.c: use html_url_path() in repolink()
Lars Hjemli [Sun, 5 Oct 2008 14:54:44 +0000 (16:54 +0200)]
ui-shared.c: use html_url_path() in repolink()

This makes sure that reponames and paths are properly escaped when used
as urls.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agohtml.c: add html_url_path
Lars Hjemli [Sun, 5 Oct 2008 14:52:57 +0000 (16:52 +0200)]
html.c: add html_url_path

This function can be used to generate properly escaped path-components
for links.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'lh/escape-urls'
Lars Hjemli [Sun, 5 Oct 2008 11:13:33 +0000 (13:13 +0200)]
Merge branch 'lh/escape-urls'

* lh/escape-urls:
  ui-shared.c: use html_url_arg()
  html.c: add html_url_arg

16 years agoui-snapshot.c: specify archiver_args.baselen
Lars Hjemli [Sun, 5 Oct 2008 11:13:03 +0000 (13:13 +0200)]
ui-snapshot.c: specify archiver_args.baselen

The struct member was introduces in git commit d53fe8187c38, but the cgit
testsuite failed to detect that cgit always generated archives without
prefixes, i.e. the result from cgit_repobasename was ignored.

This fixes the bug and the testsuite.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-shared.c: use html_url_arg()
Lars Hjemli [Sun, 5 Oct 2008 10:52:25 +0000 (12:52 +0200)]
ui-shared.c: use html_url_arg()

The link-generating functions are updated to use the new html_url_arg
function, thereby fixing links to strange repos, branches and files.

Also, the test-suite is updated to verify some cases of strange urls.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agohtml.c: add html_url_arg
Lars Hjemli [Sun, 5 Oct 2008 10:49:46 +0000 (12:49 +0200)]
html.c: add html_url_arg

This function can be used to properly escape querystring parameter values.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-diff: make diffstat header a link to the full diff
Lars Hjemli [Tue, 23 Sep 2008 15:54:45 +0000 (17:54 +0200)]
ui-diff: make diffstat header a link to the full diff

When printing a path-filtered diff it wasn't obvious how to get back to
the full diff (clicking the 'diff' tab would do this). Making the diffstat
heading into a link seems to improve the usability.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-diff: fix links from diffstat
Lars Hjemli [Tue, 23 Sep 2008 15:47:26 +0000 (17:47 +0200)]
ui-diff: fix links from diffstat

The links in the diffstat is supposed to work as a filter for the diff,
but this only worked when a single rev was supplied, i.e. the filtered
diff was always against the parent of the specified rev.

With this patch it is now possible to use the diffstat as a 'filter menu'
for urls like http://hjemli.net/git/cgit/diff/?id=v0.7.2&id2=v0.7.1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoAdd LDFLAGS to makefile.
Harley Laue [Fri, 19 Sep 2008 02:06:18 +0000 (21:06 -0500)]
Add LDFLAGS to makefile.

This will allow for creating static builds which is useful for chrooted
environments.

Signed-off-by: Harley Laue <losinggeneration@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-repolist: enable filtering of repos by path
Lars Hjemli [Sun, 14 Sep 2008 18:18:10 +0000 (20:18 +0200)]
ui-repolist: enable filtering of repos by path

If a repo url is specified but no exact match is found in the list of
repos the url will now be used as a prefix-filter.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoAdd support for --scan-tree=<path> option to cgit
Lars Hjemli [Sun, 14 Sep 2008 22:07:12 +0000 (00:07 +0200)]
Add support for --scan-tree=<path> option to cgit

This option makes cgit scan a directory tree looking for git repositories,
generating suitable definitions for a cgitrc file on stdout.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoTeach cgit how to use PATH_INFO
Lars Hjemli [Sat, 9 Aug 2008 19:11:41 +0000 (21:11 +0200)]
Teach cgit how to use PATH_INFO

This commit makes cgit use the cgi variables SCRIPT_NAME and PATH_INFO
when virtual-root is unspecified in cgitrc and no url-parameter is
specified on the querystring. This has two nice effects:

* Virtual urls works out of the box, no more need for rewrite-rules in httpd.
* Virtual urls with special querystring characters are handled correctly.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'lh/parsing'
Lars Hjemli [Mon, 15 Sep 2008 20:41:25 +0000 (22:41 +0200)]
Merge branch 'lh/parsing'

* lh/parsing:
  ui-tag: show the taggers email
  parsing.c: be prepared for unexpected content in commit/tag objects

16 years agoui-tag: show the taggers email
Lars Hjemli [Mon, 15 Sep 2008 20:40:02 +0000 (22:40 +0200)]
ui-tag: show the taggers email

If it's specified there's no point in hiding it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoparsing.c: be prepared for unexpected content in commit/tag objects
Lars Hjemli [Sun, 14 Sep 2008 07:45:37 +0000 (09:45 +0200)]
parsing.c: be prepared for unexpected content in commit/tag objects

When parsing commits and tags cgit made too many assumptions about the
formatting of said objects. This patch tries to make the code be more
prepared to handle 'malformed' objects.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoMerge branch 'ew/http_host'
Lars Hjemli [Mon, 15 Sep 2008 19:47:14 +0000 (21:47 +0200)]
Merge branch 'ew/http_host'

* ew/http_host:
  use Host: header to generate cgit_hosturl

16 years agoUpdate Makefile to use GIT-1.6.0.1
Lars Hjemli [Tue, 2 Sep 2008 22:18:09 +0000 (00:18 +0200)]
Update Makefile to use GIT-1.6.0.1

When updating the git submodule to 1.6.0.1 (and 1.6.0), the Makefile was
left behind. This fixes it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agouse Host: header to generate cgit_hosturl
Eric Wong [Mon, 1 Sep 2008 06:30:33 +0000 (23:30 -0700)]
use Host: header to generate cgit_hosturl

I run an instance of lighttpd for cgit behind nginx (nginx
doesn't execute CGI).  So the port (SERVER_PORT=33333) that
lighttpd runs on sends to cgit is different from the standard
port 80 that public clients connect to (via nginx).

This was causing the Atom feed URL to show the private port
number that lighttpd was running on.

Since the HTTP/1.1 "Host" header includes the port number if
running on a non-standard port, it allows non-client-facing HTTP
servers to transparently generate public URLs that clients can
see.

So use the "Host" header if it is available and fall back to
SERVER_NAME/SERVER_PORT for some clients that don't set
HTTP_HOST.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
16 years agoUse GIT-1.6.0.1
Lars Hjemli [Mon, 1 Sep 2008 23:06:27 +0000 (01:06 +0200)]
Use GIT-1.6.0.1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years agoui-plain: handle subdirectories
Lars Hjemli [Mon, 1 Sep 2008 22:53:04 +0000 (00:53 +0200)]
ui-plain: handle subdirectories

The callback from read_tree_recursive just needs to check the type of
each tree entry; if it's a dir we want to continue scanning, if it's a
regular file we'll assume it's the one we requested.

And while at it, remove some stray fprintfs.

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