From: Lars Hjemli Date: Sat, 12 Dec 2009 11:09:47 +0000 (+0100) Subject: Merge branch 'stable' X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/547a64fbd65de293c290f4e18bbeae958d54aaa7?ds=inline;hp=-c Merge branch 'stable' --- 547a64fbd65de293c290f4e18bbeae958d54aaa7 diff --combined Makefile index f8a4d47,7b9ac5f..d39a30e --- a/Makefile +++ b/Makefile @@@ -1,4 -1,4 +1,4 @@@ - CGIT_VERSION = v0.8.3 + CGIT_VERSION = v0.8.3.1 CGIT_SCRIPT_NAME = cgit.cgi CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) @@@ -11,9 -11,6 +11,9 @@@ INSTALL = instal # Define NO_STRCASESTR if you don't have strcasestr. # +# Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1 +# implementation (slower). +# # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). # @@@ -71,7 -68,7 +71,7 @@@ endi $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< -EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto +EXTLIBS = git/libgit.a git/xdiff/lib.a -lz OBJECTS = OBJECTS += cache.o OBJECTS += cgit.o @@@ -93,7 -90,6 +93,7 @@@ OBJECTS += ui-refs. OBJECTS += ui-repolist.o OBJECTS += ui-shared.o OBJECTS += ui-snapshot.o +OBJECTS += ui-ssdiff.o OBJECTS += ui-stats.o OBJECTS += ui-summary.o OBJECTS += ui-tag.o @@@ -127,12 -123,6 +127,12 @@@ endi ifdef NO_STRCASESTR CFLAGS += -DNO_STRCASESTR endif +ifdef NO_OPENSSL + CFLAGS += -DNO_OPENSSL + GIT_OPTIONS += NO_OPENSSL=1 +else + EXTLIBS += -lcrypto +endif cgit: $(OBJECTS) libgit $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) @@@ -142,8 -132,8 +142,8 @@@ cgit.o: VERSIO -include $(OBJECTS:.o=.d) libgit: - $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a - $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a + $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a + $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a test: all $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all diff --combined ui-tree.c index f281937,a164767..94aff8f --- a/ui-tree.c +++ b/ui-tree.c @@@ -107,12 -107,6 +107,12 @@@ static void print_object(const unsigne curr_rev, path); htmlf(")
blob: %s\n", sha1_to_hex(sha1)); + if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { + htmlf("
blob size (%dKB) exceeds display size limit (%dKB).
", + size / 1024, ctx.cfg.max_blob_size); + return; + } + if (buffer_is_binary(buf, size)) print_binary_buffer(buf, size); else @@@ -286,6 -280,6 +286,6 @@@ void cgit_print_tree(const char *rev, c } match_path = path; - read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); + read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL); ls_tail(); }