From: Lars Hjemli Date: Sun, 13 Jan 2008 17:34:37 +0000 (+0100) Subject: Merge branch 'stable' X-Git-Tag: v0.8~93 X-Git-Url: https://git.cameronkatri.com/cgit.git/commitdiff_plain/2122c696a34133a616b9ec6d72abe9eb89e728aa?hp=-c Merge branch 'stable' * stable: CGIT 0.7.2 Use GIT-1.5.3.8 Compare string lengths when parsing the snapshot mask Default repo description to "[no description]" --- 2122c696a34133a616b9ec6d72abe9eb89e728aa diff --combined Makefile index eed59df,68d617e..e39be18 --- a/Makefile +++ b/Makefile @@@ -1,10 -1,10 +1,10 @@@ - CGIT_VERSION = v0.7.1 + CGIT_VERSION = v0.7.2 CGIT_SCRIPT_NAME = cgit.cgi CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_CONFIG = /etc/cgitrc CACHE_ROOT = /var/cache/cgit SHA1_HEADER = - GIT_VER = 1.5.3.5 + GIT_VER = 1.5.3.8 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 # @@@ -16,15 -16,10 +16,15 @@@ EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ ui-summary.o ui-log.o ui-tree.o ui-commit.o ui-diff.o \ - ui-snapshot.o ui-blob.o ui-tag.o ui-refs.o + ui-snapshot.o ui-blob.o ui-tag.o ui-refs.o ui-patch.o -.PHONY: all git install clean distclean emptycache force-version get-git +ifdef NEEDS_LIBICONV + EXTLIBS += -liconv +endif + + +.PHONY: all git test install clean distclean emptycache force-version get-git all: cgit git @@@ -54,9 -49,6 +54,9 @@@ git cd git && $(MAKE) xdiff/lib.a cd git && $(MAKE) libgit.a +test: all + $(MAKE) -C tests + install: all mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH) install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) diff --combined shared.c index 9c992c8,84aa281..bf0581f --- a/shared.c +++ b/shared.c @@@ -26,8 -26,6 +26,8 @@@ char *cgit_virtual_root = NULL char *cgit_script_name = CGIT_SCRIPT_NAME; char *cgit_cache_root = CGIT_CACHE_ROOT; char *cgit_repo_group = NULL; +char *cgit_robots = "index, nofollow"; +char *cgit_clone_prefix = NULL; int cgit_nocache = 0; int cgit_snapshots = 0; @@@ -70,7 -68,7 +70,7 @@@ int htmlfd = 0 int cgit_get_cmd_index(const char *cmd) { static char *cmds[] = {"log", "commit", "diff", "tree", "blob", - "snapshot", "tag", "refs", NULL}; + "snapshot", "tag", "refs", "patch", NULL}; int i; for(i = 0; cmds[i]; i++) @@@ -118,7 -116,7 +118,7 @@@ struct repoinfo *add_repo(const char *u ret->url = trim_end(url, '/'); ret->name = ret->url; ret->path = NULL; - ret->desc = NULL; + ret->desc = "[no description]"; ret->owner = NULL; ret->group = cgit_repo_group; ret->defbranch = "master"; @@@ -199,10 -197,6 +199,10 @@@ void cgit_global_config_cb(const char * cgit_agefile = xstrdup(value); else if (!strcmp(name, "renamelimit")) cgit_renamelimit = atoi(value); + else if (!strcmp(name, "robots")) + cgit_robots = xstrdup(value); + else if (!strcmp(name, "clone-prefix")) + cgit_clone_prefix = xstrdup(value); else if (!strcmp(name, "repo.group")) cgit_repo_group = xstrdup(value); else if (!strcmp(name, "repo.url")) @@@ -211,8 -205,6 +211,8 @@@ cgit_repo->name = xstrdup(value); else if (cgit_repo && !strcmp(name, "repo.path")) cgit_repo->path = trim_end(value, '/'); + else if (cgit_repo && !strcmp(name, "repo.clone-url")) + cgit_repo->clone_url = xstrdup(value); else if (cgit_repo && !strcmp(name, "repo.desc")) cgit_repo->desc = xstrdup(value); else if (cgit_repo && !strcmp(name, "repo.owner")) @@@ -275,8 -267,6 +275,8 @@@ void *cgit_free_commitinfo(struct commi free(info->committer); free(info->committer_email); free(info->subject); + free(info->msg); + free(info->msg_encoding); free(info); return NULL; }