]> granicus.if.org Git - cgit/log
cgit
17 years agoAdd support for config param summary-branches
Lars Hjemli [Sat, 27 Oct 2007 08:13:42 +0000 (10:13 +0200)]
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>
17 years agoMove logic for age comparision from cmp_tag_age into cmp_age()
Lars Hjemli [Sat, 27 Oct 2007 08:06:03 +0000 (10:06 +0200)]
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>
17 years agoAdd support for config param summary-tags
Lars Hjemli [Thu, 25 Oct 2007 08:40:16 +0000 (10:40 +0200)]
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>
17 years agoSort tags by age
Lars Hjemli [Thu, 25 Oct 2007 18:33:04 +0000 (20:33 +0200)]
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>
17 years agoUse reflist to print tag info
Lars Hjemli [Thu, 25 Oct 2007 08:28:15 +0000 (10:28 +0200)]
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>
17 years agoUse reflist to print branch info
Lars Hjemli [Thu, 25 Oct 2007 08:13:25 +0000 (10:13 +0200)]
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>
17 years agoAdd functions and types for ref lists
Lars Hjemli [Thu, 25 Oct 2007 07:30:06 +0000 (09:30 +0200)]
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>
17 years agoMerge branch 'stable'
Lars Hjemli [Sat, 27 Oct 2007 07:15:41 +0000 (09:15 +0200)]
Merge branch 'stable'

* stable:
  Skip unknown header fields when parsing tags and commits

17 years agoSkip unknown header fields when parsing tags and commits
Lars Hjemli [Wed, 24 Oct 2007 19:14:44 +0000 (21:14 +0200)]
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>
17 years agoMerge branch 'stable'
Lars Hjemli [Fri, 5 Oct 2007 14:20:13 +0000 (16:20 +0200)]
Merge branch 'stable'

* stable:
  correct typo in CSS

17 years agocorrect typo in CSS
Michael Krelin [Thu, 4 Oct 2007 22:21:30 +0000 (00:21 +0200)]
correct typo in CSS

17 years agoMerge branch 'stable'
Lars Hjemli [Mon, 1 Oct 2007 10:51:04 +0000 (12:51 +0200)]
Merge branch 'stable'

* stable:
  Use git-1.5.3.3

17 years agoUse git-1.5.3.3
Lars Hjemli [Mon, 1 Oct 2007 10:50:07 +0000 (12:50 +0200)]
Use git-1.5.3.3

17 years agocgit.css: make diff headers more visible
Lars Hjemli [Mon, 1 Oct 2007 10:41:29 +0000 (12:41 +0200)]
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>
17 years agoui-diff: add links to pre- and postversion of blobs
Lars Hjemli [Mon, 1 Oct 2007 10:30:29 +0000 (12:30 +0200)]
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>
17 years agogen-version.sh: don't sed the output from git describe
Lars Hjemli [Mon, 1 Oct 2007 10:01:51 +0000 (12:01 +0200)]
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>
17 years agocss: remove the annoying tr:hover rule for diffstat
Lars Hjemli [Mon, 1 Oct 2007 10:09:07 +0000 (12:09 +0200)]
css: remove the annoying tr:hover rule for diffstat

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoui-commit.c: link to diff instead of tree from diffstat
Lars Hjemli [Mon, 1 Oct 2007 09:54:01 +0000 (11:54 +0200)]
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>
17 years agoAdd prefix parameter to cgit_print_diff()
Lars Hjemli [Mon, 1 Oct 2007 09:46:38 +0000 (11:46 +0200)]
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>
17 years agoAdd prefix parameter to cgit_diff_tree()
Lars Hjemli [Mon, 1 Oct 2007 09:42:19 +0000 (11:42 +0200)]
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>
17 years agoAdd support for a renamelimit option in cgitrc
Lars Hjemli [Mon, 24 Sep 2007 21:52:30 +0000 (23:52 +0200)]
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>
17 years agocgit v0.6.3 v0.6.3
Lars Hjemli [Wed, 19 Sep 2007 23:04:54 +0000 (01:04 +0200)]
cgit v0.6.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoUpgrade to GIT 1.5.3.2
Lars Hjemli [Wed, 19 Sep 2007 23:03:25 +0000 (01:03 +0200)]
Upgrade to GIT 1.5.3.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoUse trim_end() to remove trailing slashes
Lars Hjemli [Wed, 19 Sep 2007 22:56:53 +0000 (00:56 +0200)]
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>
17 years agoRemove a few compiler warnings
Lars Hjemli [Wed, 19 Sep 2007 22:21:47 +0000 (00:21 +0200)]
Remove a few compiler warnings

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoAdd cgit.conf to .gitignore, remove *~
Lars Hjemli [Wed, 19 Sep 2007 22:11:03 +0000 (00:11 +0200)]
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>
17 years agoui-tree: show last line of blob
Lars Hjemli [Wed, 19 Sep 2007 22:00:06 +0000 (00:00 +0200)]
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>
17 years agoui-tree: specify parameter position for all htmlf formats
Lars Hjemli [Wed, 19 Sep 2007 21:46:59 +0000 (23:46 +0200)]
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>
17 years agofixed typo in cgitrc
Michael Krelin [Fri, 14 Sep 2007 17:28:09 +0000 (19:28 +0200)]
fixed typo in cgitrc

Signed-off-by: Michael Krelin <hacker@klever.net>
17 years agoImprove the sample cgitrc file
Chris Pickel [Sat, 8 Sep 2007 23:37:43 +0000 (19:37 -0400)]
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>
17 years agocgit v0.6.2 v0.6.2
Lars Hjemli [Sat, 8 Sep 2007 17:10:37 +0000 (19:10 +0200)]
cgit v0.6.2

17 years agoRevert part of "Makefile: add support for DESTDIR"
Lars Hjemli [Sat, 8 Sep 2007 16:42:55 +0000 (18:42 +0200)]
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>
17 years agoRevert "Makefile: add missing references to DESTDIR"
Lars Hjemli [Sat, 8 Sep 2007 16:38:10 +0000 (18:38 +0200)]
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>
17 years agocgit v0.6.1 v0.6.1
Lars Hjemli [Sat, 8 Sep 2007 13:53:02 +0000 (15:53 +0200)]
cgit v0.6.1

17 years agoMakefile: add missing references to DESTDIR
Lars Hjemli [Sat, 8 Sep 2007 09:59:04 +0000 (11:59 +0200)]
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>
17 years agoMake cgit honor CACHE_ROOT as defined in Makefile
Chris Pickel [Sat, 8 Sep 2007 09:39:44 +0000 (11:39 +0200)]
Make cgit honor CACHE_ROOT as defined in Makefile

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoMakefile: add support for DESTDIR
Chris Pickel [Sat, 8 Sep 2007 09:34:11 +0000 (11:34 +0200)]
Makefile: add support for DESTDIR

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agocgit v0.6 v0.6
Lars Hjemli [Tue, 4 Sep 2007 09:54:37 +0000 (11:54 +0200)]
cgit v0.6

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoUpdate README
Lars Hjemli [Tue, 4 Sep 2007 09:49:40 +0000 (11:49 +0200)]
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>
17 years agoSet xdemitconf_t.findfunc=NULL
Lars Hjemli [Tue, 4 Sep 2007 09:04:47 +0000 (11:04 +0200)]
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>
17 years agoMerge branch 'jo/dirlink'
Lars Hjemli [Mon, 3 Sep 2007 21:00:06 +0000 (23:00 +0200)]
Merge branch 'jo/dirlink'

* jo/dirlink:
  Rename dirlink to gitlink.

Conflicts:

ui-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoUse git-1.5.3 as submodule
Lars Hjemli [Mon, 3 Sep 2007 20:58:02 +0000 (22:58 +0200)]
Use git-1.5.3 as submodule

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoDelete submodules.sh and prepare for using git-submodule
Lars Hjemli [Mon, 3 Sep 2007 20:54:51 +0000 (22:54 +0200)]
Delete submodules.sh and prepare for using git-submodule

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoMakefile: add target "get-git"
Lars Hjemli [Mon, 3 Sep 2007 20:42:54 +0000 (22:42 +0200)]
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>
17 years agoRewrite the makefile + gen-version.sh
Lars Hjemli [Mon, 3 Sep 2007 19:52:14 +0000 (21:52 +0200)]
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>
17 years agoui-snapshot: whitespace/formatting cleanup
Lars Hjemli [Mon, 23 Jul 2007 20:51:45 +0000 (22:51 +0200)]
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>
17 years agoMake ui-tag.c generate valid xhtml
Lars Hjemli [Sun, 22 Jul 2007 23:42:49 +0000 (01:42 +0200)]
Make ui-tag.c generate valid xhtml

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoAdd support for line number in url fragment
Lars Hjemli [Sun, 22 Jul 2007 22:46:15 +0000 (00:46 +0200)]
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>
17 years agocgit_print_snapshot_links: use url to specify snapshot name
Lars Hjemli [Sun, 22 Jul 2007 22:11:15 +0000 (00:11 +0200)]
cgit_print_snapshot_links: use url to specify snapshot name

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoMerge branch 'master' of git://git.klever.net/patchwork/cgit
Lars Hjemli [Sun, 22 Jul 2007 21:57:48 +0000 (23:57 +0200)]
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>
17 years agoAdd ui-tag.c
Lars Hjemli [Sun, 22 Jul 2007 21:42:55 +0000 (23:42 +0200)]
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>
17 years agolink raw blob from tree file view
Michael Krelin [Sat, 21 Jul 2007 17:51:47 +0000 (19:51 +0200)]
link raw blob from tree file view

Signed-off-by: Michael Krelin <hacker@klever.net>
17 years agofix: changed view link to blob in summary.
Michael Krelin [Sat, 21 Jul 2007 17:35:39 +0000 (19:35 +0200)]
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>
17 years agoallow selective enabling of snapshots
Michael Krelin [Sat, 21 Jul 2007 16:00:53 +0000 (18:00 +0200)]
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>
17 years agoshorten snapshot names to repo basename
Michael Krelin [Sat, 21 Jul 2007 13:29:55 +0000 (15:29 +0200)]
shorten snapshot names to repo basename

Signed-off-by: Michael Krelin <hacker@klever.net>
17 years agointroduce cgit_repobasename
Michael Krelin [Sat, 21 Jul 2007 13:24:07 +0000 (15:24 +0200)]
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>
17 years agoadded snapshot filename to the link
Michael Krelin [Sat, 21 Jul 2007 11:13:40 +0000 (13:13 +0200)]
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>
17 years agoadd plain uncompressed tar snapshort format
Michael Krelin [Sat, 21 Jul 2007 00:14:35 +0000 (02:14 +0200)]
add plain uncompressed tar snapshort format

time to make available snapshots selectable

Signed-off-by: Michael Krelin <hacker@klever.net>
17 years agointroduced .tar.bz2 snapshots
Michael Krelin [Sat, 21 Jul 2007 00:05:34 +0000 (02:05 +0200)]
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>
17 years agocompress .tar.gz using gzip as a filter
Michael Krelin [Fri, 20 Jul 2007 18:58:23 +0000 (20:58 +0200)]
compress .tar.gz using gzip as a filter

17 years agoadded a chk_non_negative check
Michael Krelin [Fri, 20 Jul 2007 18:56:43 +0000 (20:56 +0200)]
added a chk_non_negative check

17 years agocss: adjust vertical-align of commit info th cells
Michael Krelin [Wed, 18 Jul 2007 12:55:40 +0000 (14:55 +0200)]
css: adjust vertical-align of commit info th cells

17 years agoadd support for snapshot tarballs
Michael Krelin [Wed, 18 Jul 2007 12:40:03 +0000 (14:40 +0200)]
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

17 years agomake gen-version.sh run even if . is not in PATH
Michael Krelin [Mon, 2 Jul 2007 00:29:11 +0000 (02:29 +0200)]
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>
17 years agomake config adjustable via env variable CGIT_CONFIG
Michael Krelin [Mon, 2 Jul 2007 00:29:12 +0000 (02:29 +0200)]
make config adjustable via env variable CGIT_CONFIG

Signed-off-by: Michael Krelin <hacker@klever.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoMerge branch 'lh/menu'
Lars Hjemli [Fri, 29 Jun 2007 18:32:08 +0000 (20:32 +0200)]
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

17 years agoAdd ofs argument to cgit_log_link and use it in ui-log.c
Lars Hjemli [Fri, 29 Jun 2007 18:27:41 +0000 (20:27 +0200)]
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>
17 years agoAdd trim_end() and use it to remove trailing slashes from repo paths
Lars Hjemli [Tue, 26 Jun 2007 16:04:31 +0000 (18:04 +0200)]
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>
17 years agoDo not include current path in the "tree" menu link
Lars Hjemli [Tue, 26 Jun 2007 15:32:03 +0000 (17:32 +0200)]
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>
17 years agoAdd setting to enable/disable extra links on index page
Lars Hjemli [Mon, 18 Jun 2007 22:56:40 +0000 (00:56 +0200)]
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>
17 years agoChange S/L/T to summary/log/tree
Lars Hjemli [Mon, 18 Jun 2007 20:12:09 +0000 (22:12 +0200)]
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>
17 years agoChange "files" to "tree"
Lars Hjemli [Mon, 18 Jun 2007 20:06:00 +0000 (22:06 +0200)]
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>
17 years agoInclude querystring as part of cached filename for repo summary page
Lars Hjemli [Mon, 18 Jun 2007 19:17:24 +0000 (21:17 +0200)]
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>
17 years agoAdd version info from git-describe
Lars Hjemli [Mon, 18 Jun 2007 07:42:10 +0000 (09:42 +0200)]
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>
17 years agoAdd more menuitems on repo pages
Lars Hjemli [Sun, 17 Jun 2007 22:18:42 +0000 (00:18 +0200)]
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>
17 years agoAdd cgit_diff_link()
Lars Hjemli [Sun, 17 Jun 2007 16:12:03 +0000 (18:12 +0200)]
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>
17 years agoui-commit: use cgit_commit_link() for parent links
Lars Hjemli [Sun, 17 Jun 2007 13:44:22 +0000 (15:44 +0200)]
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>
17 years agoui-log: honor id=sha1 on querystring
Lars Hjemli [Sun, 17 Jun 2007 12:58:45 +0000 (14:58 +0200)]
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>
17 years agoAdd cgit_commit_link() + support for id=sha1 to commit view
Lars Hjemli [Sun, 17 Jun 2007 12:53:02 +0000 (14:53 +0200)]
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>
17 years agoAdd git_log_link() and fix bug in generic repolink function
Lars Hjemli [Sun, 17 Jun 2007 11:57:51 +0000 (13:57 +0200)]
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>
17 years agoui-tree: html/css cleanup
Lars Hjemli [Sun, 17 Jun 2007 11:17:00 +0000 (13:17 +0200)]
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>
17 years agoui-shared: use strcmp() to compare strings
Lars Hjemli [Sun, 17 Jun 2007 10:58:59 +0000 (12:58 +0200)]
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>
17 years agoAdd and use cgit_tree_link()
Lars Hjemli [Sat, 16 Jun 2007 23:23:08 +0000 (01:23 +0200)]
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>
17 years agoui-tree: make blob viewer generate valid html
Lars Hjemli [Sat, 16 Jun 2007 19:35:58 +0000 (21:35 +0200)]
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>
17 years agoui-tree: unify with ui-view, use path to select tree/blob
Lars Hjemli [Sat, 16 Jun 2007 18:20:42 +0000 (20:20 +0200)]
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.

17 years agocgit.css: make it validate
Lars Hjemli [Wed, 6 Jun 2007 22:43:07 +0000 (00:43 +0200)]
cgit.css: make it validate

This fixes a few validation-issues in the css.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoui-diff: close td/tr/table properly
Lars Hjemli [Wed, 6 Jun 2007 21:02:40 +0000 (23:02 +0200)]
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>
17 years agoui-diff: emit table/tr/td at better locations
Lars Hjemli [Tue, 5 Jun 2007 09:44:47 +0000 (11:44 +0200)]
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>
17 years agoRename dirlink to gitlink.
Jeffrey C. Ollie [Mon, 4 Jun 2007 17:28:56 +0000 (12:28 -0500)]
Rename dirlink to gitlink.

Git changed from dirlink to gitlink in
302b9282c9ddfcc704ca759bdc98c1d5f75eba2f.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
17 years agoImplemented configurable HEAD shortlog on summary page.
Ondrej Jirman [Sat, 26 May 2007 01:33:41 +0000 (03:33 +0200)]
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>
17 years agoCheck for NULL commit buffer in cgit_parse_commit()
Ondrej Jirman [Sat, 26 May 2007 01:27:49 +0000 (03:27 +0200)]
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>
17 years agoAdd option to disable pager to cgit_print_log().
Ondrej Jirman [Sat, 26 May 2007 01:26:14 +0000 (03:26 +0200)]
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>
17 years agoHandle single-line and empty commit subjects
Ondrej Jirman [Sat, 26 May 2007 00:19:38 +0000 (02:19 +0200)]
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>
17 years agoUse &amp; instead of & in URLs.
Ondrej Jirman [Fri, 25 May 2007 23:15:10 +0000 (01:15 +0200)]
Use &amp; instead of & in URLs.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoFixed unexpected tags in html output.
Ondrej Jirman [Fri, 25 May 2007 23:14:25 +0000 (01:14 +0200)]
Fixed unexpected tags in html output.

At least those that were catched by tidy.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agocgit v0.5 v0.5
Lars Hjemli [Wed, 23 May 2007 22:18:16 +0000 (00:18 +0200)]
cgit v0.5

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoBad html: it's nice to add alt-attributes
Lars Hjemli [Wed, 23 May 2007 22:08:36 +0000 (00:08 +0200)]
Bad html: it's nice to add alt-attributes

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoBad html: <form> should have an action-attribute
Lars Hjemli [Wed, 23 May 2007 22:06:25 +0000 (00:06 +0200)]
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>
17 years agoClose a <tr> properly
Lars Hjemli [Wed, 23 May 2007 22:02:18 +0000 (00:02 +0200)]
Close a <tr> properly

No reason to generate illegal html.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years agoAdd repo.readme parameter
Lars Hjemli [Wed, 23 May 2007 20:46:54 +0000 (22:46 +0200)]
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>