Hi,

The diff below includes git-subtree(1) in the OpenBSD git port.  It can
be used to "Merge subtrees together and split repository into subtrees"
(from the manpage).  A number of operating systems such as FreeBSD,
Debian, and Arch Linux ship with git-subtree(1) in their
git packages [1] [2] [3].

One disadvantage is that it adds more dependencies to the build (they
are necessary to prepare git-subtree.1), not sure whether that is
considered to be a problem.

As you'll observe when you read the patch, I slightly tweaked
MAKE_FLAGS.  I prepended TRUEPREFIX to gitexecdir because otherwise
git-subtree installs into
/usr/ports/pobj/git-2.19.0/fake-amd64libexec/git which is not right.
As far as I know, other parts of this port are not adversely affected
by this change.

I'd like to know whether you like the proposal to start shipping with
git-subtree(1).

Thanks,
Caspar Schutijser

[1] 
https://svnweb.freebsd.org/ports/head/devel/git/pkg-plist?revision=HEAD&view=co
[2] https://packages.debian.org/sid/amd64/git/filelist
[3] https://www.archlinux.org/packages/extra/x86_64/git/files/


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/git/Makefile,v
retrieving revision 1.193
diff -u -p -r1.193 Makefile
--- Makefile    13 Sep 2018 05:59:22 -0000      1.193
+++ Makefile    24 Sep 2018 10:01:29 -0000
@@ -10,6 +10,7 @@ PKGNAME-main =        ${DISTNAME}
 PKGNAME-svn =  git-svn-${V}
 PKGNAME-x11 =  git-x11-${V}
 CATEGORIES =   devel
+REVISION-main =        0
 
 HOMEPAGE =     https://git-scm.com/
 
@@ -35,7 +36,9 @@ MODPY_ADJ_FILES =     contrib/hooks/multimai
                        contrib/hooks/multimail/post-receive.example
 
 BUILD_DEPENDS =                devel/gettext-tools \
-                       devel/p5-Error
+                       devel/p5-Error \
+                       textproc/asciidoc \
+                       textproc/xmlto
 
 MULTI_PACKAGES =       -main -svn -x11
 
@@ -64,7 +67,7 @@ PKG_ARCH-x11 =                *
 UPDATE_PLIST_ARGS += -i MODPY_VERSION
 
 MAKE_FLAGS =           V=1 \
-                       gitexecdir=libexec/git \
+                       gitexecdir=${TRUEPREFIX}/libexec/git \
                        TCLTK_PATH=${MODTK_BIN} \
                        TCL_PATH=${MODTCL_BIN}
 MAKE_ENV =             TEST_TAR=${LOCALBASE}/bin/gtar
@@ -111,6 +114,8 @@ post-install:
        ${INSTALL_DATA} ${WRKBUILD}/contrib/hooks/setgitperms.perl \
                ${PREFIX}/share/git-core/templates/hooks/setgitperms.perl
        chown -R ${BINOWN}:${BINGRP} ${PREFIX}/libexec/git
+       ${MAKE_ENV} ${MAKE_PROGRAM} -C ${WRKBUILD}/contrib/subtree \
+               ${MAKE_FLAGS} install install-man
        ${MAKE_ENV} ${MAKE_PROGRAM} -C ${WRKBUILD}/gitweb \
                gitwebdir=${TRUEPREFIX}/share/gitweb install
        perl -pi -e "s|${WRKINST}||g" ${PREFIX}/share/gitweb/gitweb.cgi
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/devel/git/pkg/PLIST-main,v
retrieving revision 1.85
diff -u -p -r1.85 PLIST-main
--- pkg/PLIST-main      13 Sep 2018 05:59:22 -0000      1.85
+++ pkg/PLIST-main      24 Sep 2018 10:01:29 -0000
@@ -160,6 +160,7 @@ libexec/git/git-stash
 @bin libexec/git/git-stripspace
 libexec/git/git-submodule
 @bin libexec/git/git-submodule--helper
+libexec/git/git-subtree
 @bin libexec/git/git-symbolic-ref
 @bin libexec/git/git-tag
 @bin libexec/git/git-unpack-file
@@ -333,6 +334,7 @@ libexec/git/mergetools/xxdiff
 @man man/man1/git-status.1
 @man man/man1/git-stripspace.1
 @man man/man1/git-submodule.1
+@man man/man1/git-subtree.1
 @man man/man1/git-symbolic-ref.1
 @man man/man1/git-tag.1
 @man man/man1/git-unpack-file.1

Reply via email to