Commit Diff


commit - 8b8a0f1e248092016e0e09a755b2ae750551d5d4
commit + b7eff1274c82d60d1eeca924bb9c5dcb951a781c
blob - 434787543327e26c5fa9618d32100a79d95c371f
blob + 0d1934c9a5ebcef5a5393c8d83db0384f884c787
--- .gitignore
+++ .gitignore
@@ -26,6 +26,7 @@ aclocal.m4
 config.log
 config.status
 configure
+cvg/cvg
 etc/*
 got/got
 gotadmin/gotadmin
blob - e6316b7839769068e6e5f764b1e0e86978ae8ab9
blob + 04d91efdd5772f5a8034f9cbc1727ccc7767cd11
--- Makefile.am
+++ Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = compat libexec got tog gotadmin template gotwebd
+SUBDIRS = compat libexec got tog gotadmin template gotwebd cvg
 # TODO: gotd gotsh template
 
 include $(top_builddir)/Makefile.common
blob - 2c7e031eb5644e532dffb7d467b723b7fc6cf332
blob + b4694f88ccaecd942d4b26ff0a419a5339868ed0
--- configure.ac
+++ configure.ac
@@ -875,6 +875,7 @@ AH_BOTTOM([#include "got_compat2.h"])
 
 AC_CONFIG_FILES([Makefile
 		 compat/Makefile
+		 cvg/Makefile
 		 libexec/Makefile
 		 libexec/got-read-tree/Makefile
 		 libexec/got-fetch-pack/Makefile
blob - 634fb9e79d4b27681454aa33b1e5ab4c275e5f18 (mode 644)
blob + /dev/null
--- cvg/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-.PATH:${.CURDIR}/../lib
-
-.include "../got-version.mk"
-
-PROG=		cvg
-SRCS=		cvg.c blame.c commit_graph.c delta.c diff.c \
-		diffreg.c error.c fileindex.c object.c object_cache.c \
-		object_idset.c object_parse.c opentemp.c path.c pack.c \
-		privsep.c reference.c repository.c hash.c worktree.c worktree_cvg.c \
-		worktree_open.c inflate.c buf.c rcsutil.c diff3.c lockfile.c \
-		deflate.c object_create.c delta_cache.c fetch.c \
-		gotconfig.c diff_main.c diff_atomize_text.c \
-		diff_myers.c diff_output.c diff_output_plain.c \
-		diff_output_unidiff.c diff_output_edscript.c \
-		diff_patience.c send.c deltify.c pack_create.c dial.c \
-		bloom.c murmurhash2.c ratelimit.c patch.c sigs.c date.c \
-		object_open_privsep.c read_gitconfig_privsep.c \
-		read_gotconfig_privsep.c pack_create_privsep.c pollfd.c \
-		reference_parse.c object_qid.c
-
-MAN =		${PROG}.1
-
-CPPFLAGS = -I${.CURDIR}/../include -I${.CURDIR}/../lib
-
-.if defined(PROFILE)
-LDADD = -lutil_p -lz_p -lm_p -lc_p
-.else
-LDADD = -lutil -lz -lm
-.endif
-DPADD = ${LIBZ} ${LIBUTIL} ${LIBM}
-
-.if ${GOT_RELEASE} != "Yes"
-NOMAN = Yes
-.endif
-
-realinstall:
-	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
-	-m ${BINMODE} ${PROG} ${BINDIR}/${PROG}
-
-.include <bsd.prog.mk>
blob - /dev/null
blob + 5d479eb017dfffc04fe491f9c28a7e40d11418bd (mode 644)
--- /dev/null
+++ cvg/Makefile.am
@@ -0,0 +1,81 @@
+sbin_PROGRAMS = cvg
+
+include $(top_builddir)/Makefile.common
+
+cvg_SOURCES = cvg.c \ 
+	$(top_srcdir)/lib/blame.c \
+	$(top_srcdir)/lib/bloom.c \
+	$(top_srcdir)/lib/buf.c \
+	$(top_srcdir)/lib/commit_graph.c \
+	$(top_srcdir)/lib/date.c \
+	$(top_srcdir)/lib/deflate.c \
+	$(top_srcdir)/lib/delta.c \
+	$(top_srcdir)/lib/delta_cache.c \
+	$(top_srcdir)/lib/deltify.c \
+	$(top_srcdir)/lib/dial.c \
+	$(top_srcdir)/lib/diff.c \
+	$(top_srcdir)/lib/diff3.c \
+	$(top_srcdir)/lib/diff_atomize_text.c \
+	$(top_srcdir)/lib/diff_main.c \
+	$(top_srcdir)/lib/diff_myers.c \
+	$(top_srcdir)/lib/diff_output.c \
+	$(top_srcdir)/lib/diff_output_edscript.c \
+	$(top_srcdir)/lib/diff_output_plain.c \
+	$(top_srcdir)/lib/diff_output_unidiff.c \
+	$(top_srcdir)/lib/diff_patience.c \
+	$(top_srcdir)/lib/diffreg.c \
+	$(top_srcdir)/lib/error.c \
+	$(top_srcdir)/lib/fetch.c \
+	$(top_srcdir)/lib/fileindex.c \
+	$(top_srcdir)/lib/gotconfig.c \
+	$(top_srcdir)/lib/hash.c \
+	$(top_srcdir)/lib/inflate.c \
+	$(top_srcdir)/lib/lockfile.c \
+	$(top_srcdir)/lib/murmurhash2.c \
+	$(top_srcdir)/lib/object.c \
+	$(top_srcdir)/lib/object_cache.c \
+	$(top_srcdir)/lib/object_create.c \
+	$(top_srcdir)/lib/object_idset.c \
+	$(top_srcdir)/lib/object_open_privsep.c \
+	$(top_srcdir)/lib/object_parse.c \
+	$(top_srcdir)/lib/object_qid.c \
+	$(top_srcdir)/lib/opentemp.c \
+	$(top_srcdir)/lib/pack.c \
+	$(top_srcdir)/lib/pack_create.c \
+	$(top_srcdir)/lib/pack_create_privsep.c \
+	$(top_srcdir)/lib/pollfd.c \
+	$(top_srcdir)/lib/patch.c \
+	$(top_srcdir)/lib/path.c \
+	$(top_srcdir)/lib/privsep.c \
+	$(top_srcdir)/lib/ratelimit.c \
+	$(top_srcdir)/lib/rcsutil.c \
+	$(top_srcdir)/lib/read_gitconfig_privsep.c \
+	$(top_srcdir)/lib/read_gotconfig_privsep.c \
+	$(top_srcdir)/lib/reference.c \
+	$(top_srcdir)/lib/reference_parse.c \
+	$(top_srcdir)/lib/repository.c \
+	$(top_srcdir)/lib/send.c \
+	$(top_srcdir)/lib/sigs.c \
+	$(top_srcdir)/lib/worktree.c \
+	$(top_srcdir)/lib/worktree_cvg.c \
+	$(top_srcdir)/lib/worktree_open.c
+
+cvg_DEPENDENCIES = $(top_builddir)/compat/libopenbsd-compat.a
+EXTRA_DIST = cvg.1
+
+man1_MANS = cvg.1
+
+LDADD = -L$(top_builddir)/compat \
+	-lopenbsd-compat -lm
+LDADD += $(libbsd_LIBS) \
+	 $(libevent_LIBS) \
+	 $(zlib_LIBS) \
+	 $(libuuid_LIBS) \
+	 $(libutil_LIBS) \
+	 $(libmd_LIBS)
+if HOST_FREEBSD
+LDADD += -lmd
+endif
+
+AM_CPPFLAGS += $(libbsd_CFLAGS) $(libevent_CFLAGS) $(zlib_CFLAGS) \
+	       $(libuuid_CFLAGS) $(libmd_CFLAGS)
blob - 90e7cbbe69e2d39195690286398754f1c7be54bb
blob + e181471d8b0dea1bc946be7c5401049cfffeabbc
--- cvg/cvg.c
+++ cvg/cvg.c
@@ -17,7 +17,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <sys/queue.h>
+#include "got_compat.h"
+
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -29,8 +30,6 @@
 #include <limits.h>
 #include <locale.h>
 #include <ctype.h>
-#include <sha1.h>
-#include <sha2.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -41,7 +40,6 @@
 #include <paths.h>
 #include <regex.h>
 #include <getopt.h>
-#include <util.h>
 
 #include "got_version.h"
 #include "got_error.h"
blob - 845ac0dd1d3f99357c7a70e09b1f47d509ac1770
blob + 8126ed51820510b3df1993351b6170fd7fa27f7f
--- lib/dump.c
+++ lib/dump.c
@@ -14,13 +14,13 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "got_compat.h"
+
 #include <sys/queue.h>
 #include <sys/types.h>
 
 #include <ctype.h>
 #include <limits.h>
-#include <sha1.h>
-#include <sha2.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
blob - 1b1209450906449612148d5bf00dea3d5d07cb6c
blob + e5f7acd20bc17fcebf3867dd5e46f1b8b55db73d
--- lib/load.c
+++ lib/load.c
@@ -20,15 +20,11 @@
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <sys/tree.h>
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <sys/wait.h>
 
-#include <endian.h>
 #include <limits.h>
-#include <sha1.h>
-#include <sha2.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
blob - 60d6d90c718edb4cbd775eb19fd4aaa26b0e8f65
blob + 7474e1e56256feab89546eaea263ef6d37b7a7ab
--- lib/worktree_cvg.c
+++ lib/worktree_cvg.c
@@ -14,9 +14,10 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "got_compat.h"
+
 #include <sys/stat.h>
 #include <sys/queue.h>
-#include <sys/tree.h>
 
 #include <dirent.h>
 #include <limits.h>
@@ -28,13 +29,9 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
-#include <sha1.h>
-#include <sha2.h>
 #include <zlib.h>
 #include <fnmatch.h>
 #include <libgen.h>
-#include <uuid.h>
-#include <util.h>
 
 #include "got_error.h"
 #include "got_repository.h"