Commit Graph

242 Commits (e397ff7024293223f48f235fcf072fc526cae7af)
 

Author SHA1 Message Date
Lars Hjemli e397ff7024 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 ago
Lars Hjemli 47bae9f58d Merge branch 'stable'
* stable:
  Skip unknown header fields when parsing tags and commits
17 years ago
Lars Hjemli 13d2b0b25c 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 ago
Lars Hjemli f214118c56 Merge branch 'stable'
* stable:
  correct typo in CSS
17 years ago
Michael Krelin fd39489f4f correct typo in CSS 17 years ago
Lars Hjemli 9dda602ca3 Merge branch 'stable'
* stable:
  Use git-1.5.3.3
17 years ago
Lars Hjemli 2e3b6fc424 Use git-1.5.3.3 17 years ago
Lars Hjemli 271829f269 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 ago
Lars Hjemli e238ebe187 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 ago
Lars Hjemli 97aec64973 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 ago
Lars Hjemli 7e1af8ad92 css: remove the annoying tr:hover rule for diffstat
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 0ec8791ca0 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 ago
Lars Hjemli 1a6025b7a5 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 ago
Lars Hjemli f527a57c8a 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 ago
Lars Hjemli 98fcf7227c 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 ago
Lars Hjemli b65aa5d16f cgit v0.6.3
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 08b67765f9 Upgrade to GIT 1.5.3.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 4e40d8507e 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 ago
Lars Hjemli 0835ffefb8 Remove a few compiler warnings
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 6df9c7028a 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 ago
Lars Hjemli ff7a39488a 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 ago
Lars Hjemli 63d5f5eaea 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 ago
Michael Krelin 7921572fb1 fixed typo in cgitrc
Signed-off-by: Michael Krelin <hacker@klever.net>
17 years ago
Chris Pickel 0602d8c4f0 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 ago
Lars Hjemli 4beecc9a18 cgit v0.6.2 17 years ago
Lars Hjemli 6bfed7d233 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 ago
Lars Hjemli 152c5e2aca Revert "Makefile: add missing references to DESTDIR"
This reverts commit fa31c5ed48, 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 ago
Lars Hjemli af38d6565f cgit v0.6.1 17 years ago
Lars Hjemli fa31c5ed48 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 ago
Chris Pickel 898f5f89d3 Make cgit honor CACHE_ROOT as defined in Makefile
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Chris Pickel 97ded7c1c3 Makefile: add support for DESTDIR
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 96a24212fd cgit v0.6
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli bd8e8a3d70 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 ago
Lars Hjemli 0de21a8d41 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 ago
Lars Hjemli ff13396926 Merge branch 'jo/dirlink'
* jo/dirlink:
  Rename dirlink to gitlink.

Conflicts:

	ui-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 4e7e8bf961 Use git-1.5.3 as submodule
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 79f0c10df1 Delete submodules.sh and prepare for using git-submodule
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 95eaf2735e 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 ago
Lars Hjemli e8920b5262 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 ago
Lars Hjemli 1221adbb58 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 ago
Lars Hjemli 43291e418a Make ui-tag.c generate valid xhtml
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli f405d0bf75 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 ago
Lars Hjemli eb45342e73 cgit_print_snapshot_links: use url to specify snapshot name
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli 1d4aaff696 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 ago
Lars Hjemli 4e9107abfe 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 ago
Michael Krelin d6b01dac85 link raw blob from tree file view
Signed-off-by: Michael Krelin <hacker@klever.net>
17 years ago
Michael Krelin bbd4a14456 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 ago
Michael Krelin dc3c9b5bc4 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 ago
Michael Krelin 97c025ae8e shorten snapshot names to repo basename
Signed-off-by: Michael Krelin <hacker@klever.net>
17 years ago
Michael Krelin 1cb8bedf1e 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 ago