]> git.cameronkatri.com Git - cgit.git/log
cgit.git
13 years agoAllow disabling of HTTP clone URLs
Dan McGee [Wed, 12 Jan 2011 18:06:07 +0000 (12:06 -0600)]
Allow disabling of HTTP clone URLs

If advertising other URLs to your users, you may not want to make this
available through cgit (e.g. if you have the smart HTTP transport set up
elsewhere). Allow disabling the three magic commands that simulate the
git server, but default it to enabled.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
13 years agoAdd is_clone flag to available commands
Dan McGee [Wed, 12 Jan 2011 18:06:06 +0000 (12:06 -0600)]
Add is_clone flag to available commands

This will be used to make these operations configurable via a config
option.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-stats: Remove unnecessary #include
Johan Herland [Mon, 15 Nov 2010 17:39:48 +0000 (18:39 +0100)]
ui-stats: Remove unnecessary #include

<string-list.h> is already #included from cgit.h

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'tz/make-improvements'
Lars Hjemli [Tue, 9 Nov 2010 23:28:56 +0000 (00:28 +0100)]
Merge branch 'tz/make-improvements'

14 years agoui-log: Prevent crash when given empty range search
Johan Herland [Thu, 28 Oct 2010 15:05:39 +0000 (17:05 +0200)]
ui-log: Prevent crash when given empty range search

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMakefile: avoid spurious rebuilds of git sources due to `sudo make`
Lars Hjemli [Tue, 9 Nov 2010 17:08:38 +0000 (18:08 +0100)]
Makefile: avoid spurious rebuilds of git sources due to `sudo make`

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-log: Fix filecount/linecount when path limit is in effect
Johan Herland [Thu, 30 Sep 2010 18:15:14 +0000 (20:15 +0200)]
ui-log: Fix filecount/linecount when path limit is in effect

When using ui-log with path limits, the listing of commits enables parent
rewriting in Git's internal log machinery. This did not work well together
with cgit_diff_commit() which is used to generate the filecount and
linecount numbers for each commit in the log view. cgit_diff_commit() would
operate without any path limits, and would therefore process the full diff
between the commits shown (which, because of parent rewriting, is not the
same as processing the diff for the commit itself). Additionally, the bottom
commit in the log view would (again, because of parent rewriting) have zero
parents, causing us to process the entire diff between the empty tree and
that commit. Since path limits were not in effect, this would (in large
projects) reports thousands of files and millions of lines changed in that
bottom commit.

This patch fixes the issue by applying the same path limit to
cgit_diff_commit() as is applied to the rest of the log view. The result is
that the filecount/linecount now only reflects the diff as it pertains to
the given path limit.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd `strict-export` option
Felix Hanley [Mon, 8 Nov 2010 18:41:13 +0000 (19:41 +0100)]
Add `strict-export` option

This option is used to specify a filename which needs to be present in
the repositories found during `scan-path` processing. By setting this
option to 'git-daemon-export-ok', only repositories explicitly marked
for git daemon export will be included in the cgit configuration.

Signed-off-by: Felix Hanley <felix@seconddrawer.com.au>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoFix a typo in README, s/ExecCGI/+ExecCGI
Kamil Kaminski [Mon, 11 Oct 2010 04:58:30 +0000 (23:58 -0500)]
Fix a typo in README, s/ExecCGI/+ExecCGI

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAppend path and branch to atom feed title
Lars Hjemli [Sat, 25 Sep 2010 13:25:32 +0000 (14:25 +0100)]
Append path and branch to atom feed title

Currently all atom feeds for a repository get the same title but they
are actually unique per path and per branch.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse committer date for atom feed entry updated element
Chris Mayo [Sat, 25 Sep 2010 12:05:52 +0000 (13:05 +0100)]
Use committer date for atom feed entry updated element

Committer date reflects the most recent change and is used for ordering
the log page (author date is still available in published element of the
feed entry).

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Sun, 7 Nov 2010 15:25:23 +0000 (16:25 +0100)]
Merge branch 'stable'

Conflicts:
scan-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse absolute path for scanned repo readme
Dean Scarff [Thu, 26 Aug 2010 07:01:20 +0000 (15:01 +0800)]
Use absolute path for scanned repo readme

repo.readme is transformed to an absolute path when read from the config,
so add_repo needs to add "README.html" with the repository path too.

Signed-off-by: Dean Scarff <dos@scarff.id.au>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMakefile: add -MP option
Lars Hjemli [Sun, 7 Nov 2010 15:13:49 +0000 (16:13 +0100)]
Makefile: add -MP option

Work around errors `make` gives when header files are removed without
the Makefile being updated.

Signed-off-by: Lynn Lin <Lynn.Lin@emc.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Mon, 27 Sep 2010 06:03:30 +0000 (08:03 +0200)]
Merge branch 'stable'

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoCGIT 0.8.3.4 v0.8.3.4
Lars Hjemli [Mon, 27 Sep 2010 06:00:47 +0000 (08:00 +0200)]
CGIT 0.8.3.4

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse GIT-1.7.3
Lars Hjemli [Mon, 27 Sep 2010 05:58:01 +0000 (07:58 +0200)]
Use GIT-1.7.3

This fixes http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-2542.

Noticed-by: Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Sun, 19 Sep 2010 18:58:15 +0000 (20:58 +0200)]
Merge branch 'stable'

14 years agoRSS items should always use UTC times
Aaron Griffin [Wed, 15 Sep 2010 15:16:33 +0000 (10:16 -0500)]
RSS items should always use UTC times

The format uses a 'Z' suffix, which indicates no TZ offset.
Thus we should not respect the local-time config setting here.

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse example.com in documentation, per RFC 2606
Todd Zullinger [Mon, 6 Sep 2010 13:31:26 +0000 (09:31 -0400)]
Use example.com in documentation, per RFC 2606

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agocgit.css: Add syntax highlighting entries
Todd Zullinger [Mon, 6 Sep 2010 13:31:25 +0000 (09:31 -0400)]
cgit.css: Add syntax highlighting entries

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoInstall filter scripts
Todd Zullinger [Mon, 6 Sep 2010 13:31:24 +0000 (09:31 -0400)]
Install filter scripts

The syntax-highlighting.sh script is quite useful without any changes.
Installing it by default makes it easier to use and package.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd Makefile targets to install/uninstall docs
Todd Zullinger [Mon, 6 Sep 2010 13:31:23 +0000 (09:31 -0400)]
Add Makefile targets to install/uninstall docs

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoGeneralize doc generation
Todd Zullinger [Mon, 6 Sep 2010 13:31:22 +0000 (09:31 -0400)]
Generalize doc generation

This borrows from the git Documentation/Makefile.  The goal is to make
it easier to add new man pages and other documentation as well as to
prevent make from re-generating the documentation needlessly.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'ml/bugfix'
Lars Hjemli [Sun, 19 Sep 2010 17:00:05 +0000 (19:00 +0200)]
Merge branch 'ml/bugfix'

14 years agoMerge branch 'lh/section-from-path'
Lars Hjemli [Sun, 19 Sep 2010 16:46:17 +0000 (18:46 +0200)]
Merge branch 'lh/section-from-path'

Conflicts:
scan-tree.c

14 years agoMerge branch 'lh/readme'
Lars Hjemli [Sun, 19 Sep 2010 16:43:58 +0000 (18:43 +0200)]
Merge branch 'lh/readme'

14 years agoUse GIT-1.7.3
Lars Hjemli [Sun, 19 Sep 2010 12:00:46 +0000 (14:00 +0200)]
Use GIT-1.7.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoprefer html_raw() to write()
Mark Lodato [Sat, 4 Sep 2010 18:18:16 +0000 (14:18 -0400)]
prefer html_raw() to write()

To make the code more consistent, and to not rely on the implementation
of html(), always use html_raw(...) instead of write(htmlfd, ...).

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agoui-repolist: fix redefinition of _XOPEN_SOURCE
Mark Lodato [Sat, 4 Sep 2010 15:49:30 +0000 (11:49 -0400)]
ui-repolist: fix redefinition of _XOPEN_SOURCE

Previously, ui-repolist.c set _GNU_SOURCE and then included a standard
library before including <git-compat-util.h>.  This was a problem,
because <git-compat-util.h> redefined _XOPEN_SOURCE, which is set
automatically by glibc when _GNU_SOURCE is set.  However,
<git-compat-util.h> already sets _GNU_SOURCE and includes both
<string.h> and <time.h>, so there is no need to define _GNU_SOURCE or
include either header within ui-repolist.c.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agofix errors in printf-style format strings
Mark Lodato [Sat, 4 Sep 2010 15:30:18 +0000 (11:30 -0400)]
fix errors in printf-style format strings

There were many places where the arguments to a printf-like function did
not match the format string.  Mostly, these were a missing 'l' flag, but
there were three exceptions:

- In ui-stats.c, a size_t argument must be printed.  C99 has the "%zu"
  flag for this purpose, but not all compilers support this.  Therefore,
  we mimic what git does - use a NO_C99_FORMAT Makefile variable.

- In ui-stats.c, cgit_print_error() was called with a pointer instead of
  a character.

- In ui-log.c, the "columns" argument was never used.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agouse __attribute__ to catch printf format mistakes
Mark Lodato [Sat, 4 Sep 2010 15:09:57 +0000 (11:09 -0400)]
use __attribute__ to catch printf format mistakes

Use "__attribute__((format (printf,N,M)))", as is done in git, do catch
mistakes in printf-style format strings.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Wed, 1 Sep 2010 12:32:57 +0000 (12:32 +0000)]
Merge branch 'stable'

14 years agoui-snapshot: actually compress zip archives
Lars Hjemli [Wed, 1 Sep 2010 12:13:12 +0000 (12:13 +0000)]
ui-snapshot: actually compress zip archives

Since cgit linked with git-1.6.0 all zip archives has been uncompressed.
This patch fixes the issue by specifying Z_DEFAULT_COMPRESSION.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Sun, 29 Aug 2010 15:40:51 +0000 (17:40 +0200)]
Merge branch 'stable'

14 years agohtml: fix strcpy bug in convert_query_hexchar
Mark Lodato [Sat, 28 Aug 2010 01:02:27 +0000 (21:02 -0400)]
html: fix strcpy bug in convert_query_hexchar

The source and destination strings in strcpy() may not overlap.
Instead, use memmove(), which allows overlap.  This fixes test t0104,
where 'url=foo%2bbar/tree' was being parsed improperly.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agot0108-patch: add 'tests_done' to end
Mark Lodato [Fri, 27 Aug 2010 02:02:03 +0000 (22:02 -0400)]
t0108-patch: add 'tests_done' to end

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agoAdd support for 'section-from-path' option
Lars Hjemli [Sat, 21 Aug 2010 13:44:09 +0000 (15:44 +0200)]
Add support for 'section-from-path' option

This option can be used to autogenerate section names during scan-path
processing.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd support for "readme" option
Lars Hjemli [Sat, 21 Aug 2010 13:08:01 +0000 (15:08 +0200)]
Add support for "readme" option

The value of this option is used as the default value for repo.readme.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse GIT-1.7.2.2
Lars Hjemli [Sun, 22 Aug 2010 11:29:57 +0000 (13:29 +0200)]
Use GIT-1.7.2.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoSupport refspecs in about-filter.
Jason A. Donenfeld [Tue, 3 Aug 2010 22:45:42 +0000 (00:45 +0200)]
Support refspecs in about-filter.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'jd/gitolite'
Lars Hjemli [Wed, 4 Aug 2010 01:10:29 +0000 (03:10 +0200)]
Merge branch 'jd/gitolite'

14 years agoMerge branch 'js/notes'
Lars Hjemli [Wed, 4 Aug 2010 01:10:24 +0000 (03:10 +0200)]
Merge branch 'js/notes'

14 years agoui-log: Display git notes when present
Jeff Smith [Thu, 29 Jul 2010 14:32:31 +0000 (09:32 -0500)]
ui-log: Display git notes when present

Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-commit: Display git notes when present
Jeff Smith [Thu, 29 Jul 2010 14:32:30 +0000 (09:32 -0500)]
ui-commit: Display git notes when present

Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd support for 'enable-gitweb-owner' option
Jason A. Donenfeld [Thu, 29 Jul 2010 18:38:01 +0000 (20:38 +0200)]
Add support for 'enable-gitweb-owner' option

When this option is enabled (which it is by default), cgit will lookup
the 'gitweb.owner' setting in each git config file found when processing
the 'scan-path' option.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd support for 'remove-suffix' option
Jason A. Donenfeld [Thu, 29 Jul 2010 17:47:50 +0000 (19:47 +0200)]
Add support for 'remove-suffix' option

When this option is enabled, the '.git' suffix of repository directories
found while processing the 'scan-path' option will be removed.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd support for 'project-list' option
Jason A. Donenfeld [Thu, 29 Jul 2010 15:52:29 +0000 (17:52 +0200)]
Add support for 'project-list' option

This option specifies the location of a projectlist file as used by
gitweb - when 'scan-tree' is later specified, only the projects listed in
the projectlist file will be added.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Tue, 3 Aug 2010 20:52:11 +0000 (22:52 +0200)]
Merge branch 'stable'

14 years agoCGIT 0.8.3.3 v0.8.3.3
Lars Hjemli [Tue, 3 Aug 2010 20:50:02 +0000 (22:50 +0200)]
CGIT 0.8.3.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-refs.c: avoid segfault on unparsed ref objects
Lars Hjemli [Tue, 3 Aug 2010 20:06:21 +0000 (22:06 +0200)]
ui-refs.c: avoid segfault on unparsed ref objects

When a ref refers to something other then a commit or tag object, cgit
could segfault when trying to display the tag info.

Noticed-by: Eugene Sajine <euguess@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agocommit-links.sh: Seperate the expressions for filtering commit messages.
Jeff Smith [Tue, 6 Jul 2010 03:38:34 +0000 (22:38 -0500)]
commit-links.sh: Seperate the expressions for filtering commit messages.

This allows for putting descriptions closer to their expressions.  It
should also make it clearer how to apply an expression conditionally.

14 years agoMakefile: do not include dependency-file on `make clean`
Lynn Lin [Thu, 15 Jul 2010 06:38:06 +0000 (14:38 +0800)]
Makefile: do not include dependency-file on `make clean`

When envoking clean target, make should not perform the dependency file
generation triggered by include.

14 years agoMerge branch 'jh/ignorews'
Lars Hjemli [Sun, 18 Jul 2010 13:03:30 +0000 (15:03 +0200)]
Merge branch 'jh/ignorews'

14 years agoMerge branch 'lh/macros'
Lars Hjemli [Sun, 18 Jul 2010 13:03:08 +0000 (15:03 +0200)]
Merge branch 'lh/macros'

14 years agoui-diff: Add link to ignore/show whitespace changes in diffs
Johan Herland [Thu, 24 Jun 2010 15:53:20 +0000 (17:53 +0200)]
ui-diff: Add link to ignore/show whitespace changes in diffs

Add a link to the "Diffstat" line to ignore/show whitespace changes in the
generated diff.

To support this, cgit_commit_link() and cgit_diff_link() has learned to
preserve the ctx.qry.ignorews variable.

Signed-off-by: Johan Herland <johan@herland.net>
14 years agoAdd URL parameter 'ignorews' for optionally ignoring whitespace in diffs
Johan Herland [Thu, 24 Jun 2010 15:52:57 +0000 (17:52 +0200)]
Add URL parameter 'ignorews' for optionally ignoring whitespace in diffs

The new ctx.qry.ignorews variable is passed via cgit_diff_files() and
cgit_diff_tree() to Git's diff machinery. This is equivalent to passing
--ignore-all-space to 'git diff'.

Signed-off-by: Johan Herland <johan@herland.net>
14 years agoMerge branch 'stable'
Lars Hjemli [Tue, 13 Jul 2010 19:55:47 +0000 (21:55 +0200)]
Merge branch 'stable'

14 years agoReencode author and committer
Rémi Lagacé [Tue, 13 Jul 2010 17:15:09 +0000 (19:15 +0200)]
Reencode author and committer

When a commit has a specific encoding, this encoding also applies to
the author and committer name and email.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'lh/range-search'
Lars Hjemli [Tue, 22 Jun 2010 14:16:24 +0000 (16:16 +0200)]
Merge branch 'lh/range-search'

14 years agoMerge branch 'jh/context-lines'
Lars Hjemli [Tue, 22 Jun 2010 14:16:12 +0000 (16:16 +0200)]
Merge branch 'jh/context-lines'

Conflicts:
cgit.c
cgit.h

14 years agoMerge branch 'jh/path-limit'
Lars Hjemli [Tue, 22 Jun 2010 14:15:48 +0000 (16:15 +0200)]
Merge branch 'jh/path-limit'

Conflicts:
cgit.h
ui-commit.c

14 years agoui-log.c: allow commit range as search expression
Lars Hjemli [Sat, 19 Jun 2010 12:32:37 +0000 (14:32 +0200)]
ui-log.c: allow commit range as search expression

Inspired-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-diff: Add links to increase/decrease number of context lines in diffs
Johan Herland [Thu, 10 Jun 2010 18:15:51 +0000 (20:15 +0200)]
ui-diff: Add links to increase/decrease number of context lines in diffs

Add two links to the "Diffstat" line to show more/less context lines in the
generated diff.

To support this, cgit_commit_link() and cgit_diff_link() has learned to
preserve the ctx.qry.context variable.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd URL parameter 'context' for changing the number of context lines in diffs
Johan Herland [Thu, 10 Jun 2010 18:15:27 +0000 (20:15 +0200)]
Add URL parameter 'context' for changing the number of context lines in diffs

The new ctx.qry.context variable is picked up by cgit_print_diff(), and
passed via cgit_diff_files() to Git's diff machinery.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared.c: path-limit style nitpick
Lars Hjemli [Sat, 19 Jun 2010 09:35:57 +0000 (11:35 +0200)]
ui-shared.c: path-limit style nitpick

This subjectively makes the path-limit bar less visually intrusive.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoFix style of commit-filter links in commit-subject.
Johan Herland [Fri, 18 Jun 2010 15:56:11 +0000 (17:56 +0200)]
Fix style of commit-filter links in commit-subject.

When using the commit-filter functionality to add e.g. bug tracker links to
commit messages, the style of those links is mangled by a CSS directive that
is meant to only apply to decorations that are listed on the commit-subject
line.

Fix this directive to only apply to the decorations.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Sat, 19 Jun 2010 09:52:42 +0000 (11:52 +0200)]
Merge branch 'stable'

14 years agoCGIT 0.8.3.2 v0.8.3.2
Lars Hjemli [Sat, 19 Jun 2010 09:50:58 +0000 (11:50 +0200)]
CGIT 0.8.3.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'ag/atom-fixes'
Lars Hjemli [Sat, 19 Jun 2010 09:42:12 +0000 (11:42 +0200)]
Merge branch 'ag/atom-fixes'

14 years agoMerge branch 'lh/noweb'
Lars Hjemli [Sat, 19 Jun 2010 09:41:32 +0000 (11:41 +0200)]
Merge branch 'lh/noweb'

14 years agoMerge branch 'ml/plain-improvements-part1'
Lars Hjemli [Sat, 19 Jun 2010 09:40:34 +0000 (11:40 +0200)]
Merge branch 'ml/plain-improvements-part1'

14 years agoMerge branch 'sn/subject-link'
Lars Hjemli [Sat, 19 Jun 2010 09:38:46 +0000 (11:38 +0200)]
Merge branch 'sn/subject-link'

14 years agoui-log: Preserve path limit in outgoing links
Johan Herland [Fri, 11 Jun 2010 12:50:47 +0000 (14:50 +0200)]
ui-log: Preserve path limit in outgoing links

This allows navigation through the 'log' page/command without losing the
active path limit.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Preserve path limit in "tab bar" links
Johan Herland [Wed, 9 Jun 2010 23:09:36 +0000 (01:09 +0200)]
ui-shared: Preserve path limit in "tab bar" links

When using the "tab bar" in the pageheader to navigate between pages, any
path limit in effect on the current page is forgotten in the link to the
target page, even if the target page can interpret and use the path limit
constructively.

Instead, preserve the current page's path limit in the "tab bar" links to
other pages, where the path limit is useful to the target page.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-commit: Preserve path limit in links to commit page
Johan Herland [Wed, 9 Jun 2010 23:09:35 +0000 (01:09 +0200)]
ui-commit: Preserve path limit in links to commit page

This includes adding a path argument to cgit_commit_link() and updating all
its callers. The callers from within the commit page (i.e. the "commit",
"unidiff"/"side-by-side diff" and "parent" links) all preserve the path
limit of the current commit page. All other callers pass NULL (i.e. no path
limit).

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-commit: Preserve path limit in links to tree and diff pages
Johan Herland [Wed, 9 Jun 2010 23:09:34 +0000 (01:09 +0200)]
ui-commit: Preserve path limit in links to tree and diff pages

For tree links, the original link is unchanged, but in the case of a path
limit, a subtree link is added to the right of the original tree link.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-patch: Apply path limit to generated patch
Johan Herland [Wed, 9 Jun 2010 23:09:33 +0000 (01:09 +0200)]
ui-patch: Apply path limit to generated patch

Also indicate in the comment section of the patch that a path limit was
applied, too easily see when a generated patch is only partial.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-commit: Limit diff based on path limit in qry.path
Johan Herland [Wed, 9 Jun 2010 23:09:32 +0000 (01:09 +0200)]
ui-commit: Limit diff based on path limit in qry.path

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-diff: Teach diffstat to obey path limit
Johan Herland [Wed, 9 Jun 2010 23:09:31 +0000 (01:09 +0200)]
ui-diff: Teach diffstat to obey path limit

Also indicate in the diffstat header if a path limit is in effect.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-tree: Remove unnecessary path breadcrumb navigation
Johan Herland [Wed, 9 Jun 2010 23:09:30 +0000 (01:09 +0200)]
ui-tree: Remove unnecessary path breadcrumb navigation

The path breadcrumb navigation at the top of the 'tree' page has now been
duplicated in ui-shared, which leaves the ui-tree implementation unnecessary.

This patch removes the breadcrumb navigation from ui-tree, and moves the
"(plain)" link that followed the breadcrumb when displaying blobs to the
end of the next line, following the blob SHA1.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Teach "breadcrumb" navigation to path limit display beneath tab bar
Johan Herland [Wed, 9 Jun 2010 23:09:29 +0000 (01:09 +0200)]
ui-shared: Teach "breadcrumb" navigation to path limit display beneath tab bar

When a path limit is in effect, and displayed directly beneath the tab bar,
it should offer breadcrumb navigation (like what the 'tree' page does), to
allow changing the path limit easily.

Implementing this requires a robust way to link back to the current page with
a changed ctx->qry.path, but without losing track of the other query
arguments. This is solved by adding the new cgit_self_link() function, which
is then invoked repeatedly by the new cgit_print_path_crumbs() function while
manipulating ctx->qry.path.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Display path limit directly beneath tab bar in relevant pages
Johan Herland [Wed, 9 Jun 2010 23:09:28 +0000 (01:09 +0200)]
ui-shared: Display path limit directly beneath tab bar in relevant pages

Design-wise, the path is shown by "expanding" the grey border between the
tab bar and the content area of the page to house the current path limit.

This is only displayed on pages where the path limit is relevant, and only
when a path limit is in effect.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Replace ctx.qry.path with ctx.qry.vpath
Johan Herland [Wed, 9 Jun 2010 23:09:27 +0000 (01:09 +0200)]
ui-shared: Replace ctx.qry.path with ctx.qry.vpath

In all cases where ui-shared uses ctx.qry.path, it is done so in the context
of a in-project path, and not in the context in which the 'refs' page or the
'clone'-related functionality uses ctx.qry.path. Make this explicit by using
ctx.qry.vpath instead.

This path introduces no fundamental difference in functionality except for
fixing some minor bugs, for example the Atom feed reference from a
"$repo/refs/heads/" page.

Note that the usage of ctx.qry.path in the other ui-<page>.c files is ok,
since that code presumably is only executed in the context of its own <page>,
so the correct interpretation of ctx.qry.path is never in question.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agostruct cgit_cmd: Differentiate between various usages of ctx.qry.path
Johan Herland [Wed, 9 Jun 2010 23:09:26 +0000 (01:09 +0200)]
struct cgit_cmd: Differentiate between various usages of ctx.qry.path

For many commands/pages (e.g. 'tree', 'diff', 'plain', etc.), the
ctx.qry.path argument is interpreted as a path within the "virtual" project
directory structure. However, for some other commands (notably 'refs', and
the clone-related commands) ctx.qry.path is used in a different context (as
a more or less "real" path within the '.git' directory).

This patch differentiates between these two usages of ctx.qry.path, by
introducing a new variable - ctx.qry.vpath - which is equal to ctx.qry.path
in the former case, and NULL in the latter.

This will become useful in future patches when we want various pages and the
links between them to preserve existing in-project paths.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Remove needless cgit_get_cmd() call, and refactor hc() accordingly
Johan Herland [Wed, 9 Jun 2010 23:09:25 +0000 (01:09 +0200)]
ui-shared: Remove needless cgit_get_cmd() call, and refactor hc() accordingly

The call to cgit_get_cmd() and the following fallback handling (to "summary"
or "repoindex") in cgit_print_pageheader() is unnecessary, since the same
fallback handling was already done when ctx.qry.page was set when
cgit_get_cmd() was called from process_request() in cgit.c.

As such, hc() can also be rewritten to simply compare the given 'page' string
against ctx.qry.page.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared: Improve const-ness in API
Johan Herland [Wed, 9 Jun 2010 23:09:24 +0000 (01:09 +0200)]
ui-shared: Improve const-ness in API

This is needed to prevent const-related warnings in later patches.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoRemove unused variable in shared.c
Johan Herland [Wed, 9 Jun 2010 23:09:23 +0000 (01:09 +0200)]
Remove unused variable in shared.c

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoFix small typo in cgitrc example
Johan Herland [Wed, 9 Jun 2010 23:09:22 +0000 (01:09 +0200)]
Fix small typo in cgitrc example

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'stable'
Lars Hjemli [Wed, 7 Apr 2010 22:50:20 +0000 (00:50 +0200)]
Merge branch 'stable'

14 years agoshared.c: avoid memory leak during diff
Lars Hjemli [Wed, 7 Apr 2010 22:48:36 +0000 (00:48 +0200)]
shared.c: avoid memory leak during diff

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd 'max-atom-items' config variable
Aaron Griffin [Fri, 5 Feb 2010 00:08:16 +0000 (18:08 -0600)]
Add 'max-atom-items' config variable

This allows one to specify the items in the RSS feeds

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd all=1 query param for atom feeds
Aaron Griffin [Thu, 4 Feb 2010 00:31:17 +0000 (18:31 -0600)]
Add all=1 query param for atom feeds

Displays all items from all branches in one feed

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoAdd support for environment variable expansion
Lars Hjemli [Sun, 21 Mar 2010 23:09:43 +0000 (00:09 +0100)]
Add support for environment variable expansion

This patch teaches cgit to expand environment variables in certain
cgitrc option values (cache_root, scan-path, include) plus when
finding the location of cgitrc itself.

One use case for this feature is virtual hosting - e.g. by setting
$CGIT_CONFIG='/etc/cgitrc/$HTTP_HOST' in httpd.conf, all virtual
hosts automatically gets their own cgitrc.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-tree: add link to plain view for blobs in tree listing
Lars Hjemli [Sun, 28 Feb 2010 21:18:00 +0000 (22:18 +0100)]
ui-tree: add link to plain view for blobs in tree listing

Suggested-by: Robert Weidlich <mail@robertweidlich.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoscan-tree: add test for noweb-file in repo dir
Lars Hjemli [Sun, 28 Feb 2010 17:40:02 +0000 (18:40 +0100)]
scan-tree: add test for noweb-file in repo dir

If such a file exists, the repo is not added to the repolist.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse GIT-1.7.0
Lars Hjemli [Sat, 27 Feb 2010 12:39:53 +0000 (13:39 +0100)]
Use GIT-1.7.0

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoMerge branch 'html-updates' of git://github.com/MarkLodato/cgit
Lars Hjemli [Sat, 27 Feb 2010 12:20:27 +0000 (13:20 +0100)]
Merge branch 'html-updates' of git://github.com/MarkLodato/cgit

14 years agoOptionally generate verbose parent links
Lars Hjemli [Sat, 27 Feb 2010 12:12:55 +0000 (13:12 +0100)]
Optionally generate verbose parent links

The new option 'enable-subject-links' must be used to enable the verbose
parent-links in commit view.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agodisplay subject instead of sha1 as link title of parents
Stefan Naewe [Mon, 15 Feb 2010 08:57:50 +0000 (09:57 +0100)]
display subject instead of sha1 as link title of parents

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>