[98609] trunk/dports/devel/git-core

ciserlohn at macports.org ciserlohn at macports.org
Tue Oct 9 14:23:11 PDT 2012


Revision: 98609
          http://trac.macports.org//changeset/98609
Author:   ciserlohn at macports.org
Date:     2012-10-09 14:23:11 -0700 (Tue, 09 Oct 2012)
Log Message:
-----------
git-core: update to version 1.7.12.3

* Install git-subtree by default (see #36492). The man page for the subtree
  command is added in a patchfile to avoid additional dependencies just for
  building one manpage.

Modified Paths:
--------------
    trunk/dports/devel/git-core/Portfile

Added Paths:
-----------
    trunk/dports/devel/git-core/files/git-subtree.1.diff

Modified: trunk/dports/devel/git-core/Portfile
===================================================================
--- trunk/dports/devel/git-core/Portfile	2012-10-09 19:47:13 UTC (rev 98608)
+++ trunk/dports/devel/git-core/Portfile	2012-10-09 21:23:11 UTC (rev 98609)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 
 name                git-core
-version             1.7.12.2
+version             1.7.12.3
 description         A fast version control system
 long_description    Git is a fast, scalable, distributed open source version \
                     control system focusing on speed and efficiency.
@@ -19,11 +19,11 @@
                     git-manpages-${version}${extract.suffix}
 
 checksums           git-${version}${extract.suffix} \
-                    rmd160  8b50f2fe3c04e3bf7c3489e14f0cf2512eee251e \
-                    sha256  1671b960dd761ef15d85f9be05d0b449b89f13ae39902082f9df865d85dac8aa \
+                    rmd160  6eb07bfb097bfebee320cd3d39953786885ed642 \
+                    sha256  5d0959c316a2cdebaaf72cf27ac87d2e5616596a530dddeeb3a961c615494094 \
                     git-manpages-${version}${extract.suffix} \
-                    rmd160  63431ad78aee98da30c1a1ab2dd9dd60bc6c6e93 \
-                    sha256  a3b3482c7e3483c69d95dac5c6703a0c8ba31135d09cd19e1bce6564903684cd \
+                    rmd160  2e8dddf43e20ffd98fcca2cb2541700b0d994946 \
+                    sha256  fa85885f813c5081071629e3dd8832cad730b8e481f33e9cbb00edfb3af4f24f \
 
 depends_run         port:rsync \
                     port:p5.12-error \
@@ -36,7 +36,7 @@
                     port:expat \
                     port:libiconv
 
-patchfiles          patch-Makefile.diff 0001-setup-Do-not-strip-trailing-from-paths.patch
+patchfiles          patch-Makefile.diff 0001-setup-Do-not-strip-trailing-from-paths.patch git-subtree.1.diff
 patch.pre_args      -p1
 
 extract.only        git-${version}${extract.suffix} \
@@ -73,6 +73,7 @@
 destroot.target     install
 pre-destroot {
     eval destroot.args  ${build.args}
+    copy ${worksrcpath}/contrib/subtree/git-subtree.1 ${workpath}/man1
 }
 
 set docdestroot ${destroot}${prefix}/share/doc/${name}
@@ -104,6 +105,9 @@
     xinstall -d ${share_path}
     xinstall -m 644 ${worksrcpath}/contrib/completion/git-prompt.sh \
         ${share_path}/git-prompt.sh
+
+    xinstall -m 755 ${worksrcpath}/contrib/subtree/git-subtree.sh \
+        ${destroot}${prefix}/libexec/git-core/git-subtree
 }
 
 if {![variant_isset python26] && ![variant_isset python27]} {
@@ -128,8 +132,8 @@
 variant doc description {Install HTML and plaintext documentation} {
     distfiles-append        git-htmldocs-${version}${extract.suffix}
     checksums-append        git-htmldocs-${version}${extract.suffix} \
-                            rmd160  df6abef6a61413ab54ef310a3c835f901465fe02 \
-                            sha256  39510a4d433d7d4922cf95cbbdf6206a7dd470d8301f8f3c21779d3ff7ceff0e
+                            rmd160  28fb5cf12bd39d49812fa5529413bc5418bbdcfe \
+                            sha256  ec8e10b989e8f94d1607ecece7d4a2e91fa07e5f47e02944fdab3b7904f51a3f
 
     post-extract {
         file mkdir ${workpath}/htmldocs

Added: trunk/dports/devel/git-core/files/git-subtree.1.diff
===================================================================
--- trunk/dports/devel/git-core/files/git-subtree.1.diff	                        (rev 0)
+++ trunk/dports/devel/git-core/files/git-subtree.1.diff	2012-10-09 21:23:11 UTC (rev 98609)
@@ -0,0 +1,609 @@
+diff -urN a/contrib/subtree/git-subtree.1 b/contrib/subtree/git-subtree.1
+--- a/contrib/subtree/git-subtree.1	1970-01-01 01:00:00.000000000 +0100
++++ b/contrib/subtree/git-subtree.1	2012-10-09 22:42:37.000000000 +0200
+@@ -0,0 +1,605 @@
++'\" t
++.\"     Title: git-subtree
++.\"    Author: [see the "AUTHOR" section]
++.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
++.\"      Date: 10/09/2012
++.\"    Manual: Git Manual
++.\"    Source: Git 1.7.12.2
++.\"  Language: English
++.\"
++.TH "GIT\-SUBTREE" "1" "10/09/2012" "Git 1\&.7\&.12\&.2" "Git Manual"
++.\" -----------------------------------------------------------------
++.\" * Define some portability stuff
++.\" -----------------------------------------------------------------
++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++.\" http://bugs.debian.org/507673
++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++.ie \n(.g .ds Aq \(aq
++.el       .ds Aq '
++.\" -----------------------------------------------------------------
++.\" * set default formatting
++.\" -----------------------------------------------------------------
++.\" disable hyphenation
++.nh
++.\" disable justification (adjust text to left margin only)
++.ad l
++.\" -----------------------------------------------------------------
++.\" * MAIN CONTENT STARTS HERE *
++.\" -----------------------------------------------------------------
++.SH "NAME"
++git-subtree \- Merge subtrees together and split repository into subtrees
++.SH "SYNOPSIS"
++.sp
++.nf
++\fIgit subtree\fR add   \-P <prefix> <commit>
++\fIgit subtree\fR pull  \-P <prefix> <repository> <refspec\&...>
++\fIgit subtree\fR push  \-P <prefix> <repository> <refspec\&...>
++\fIgit subtree\fR merge \-P <prefix> <commit>
++\fIgit subtree\fR split \-P <prefix> [OPTIONS] [<commit>]
++.fi
++.SH "DESCRIPTION"
++.sp
++Subtrees allow subprojects to be included within a subdirectory of the main project, optionally including the subproject\(cqs entire history\&.
++.sp
++For example, you could include the source code for a library as a subdirectory of your application\&.
++.sp
++Subtrees are not to be confused with submodules, which are meant for the same task\&. Unlike submodules, subtrees do not need any special constructions (like \&.gitmodule files or gitlinks) be present in your repository, and do not force end\-users of your repository to do anything special or to understand how subtrees work\&. A subtree is just a subdirectory that can be committed to, branched, and merged along with your project in any way you want\&.
++.sp
++They are also not to be confused with using the subtree merge strategy\&. The main difference is that, besides merging the other project as a subdirectory, you can also extract the entire history of a subdirectory from your project and make it into a standalone project\&. Unlike the subtree merge strategy you can alternate back and forth between these two operations\&. If the standalone library gets updated, you can automatically merge the changes into your project; if you update the library inside your project, you can "split" the changes back out again and merge them back into the library project\&.
++.sp
++For example, if a library you made for one application ends up being useful elsewhere, you can extract its entire history and publish that as its own git repository, without accidentally intermingling the history of your application project\&.
++.if n \{\
++.sp
++.\}
++.RS 4
++.it 1 an-trap
++.nr an-no-space-flag 1
++.nr an-break-flag 1
++.br
++.ps +1
++\fBTip\fR
++.ps -1
++.br
++.sp
++In order to keep your commit messages clean, we recommend that people split their commits between the subtrees and the main project as much as possible\&. That is, if you make a change that affects both the library and the main application, commit it in two pieces\&. That way, when you split the library commits out later, their descriptions will still make sense\&. But if this isn\(cqt important to you, it\(cqs not \fBnecessary\fR\&. git subtree will simply leave out the non\-library\-related parts of the commit when it splits it out into the subproject later\&.
++.sp .5v
++.RE
++.SH "COMMANDS"
++.PP
++add
++.RS 4
++Create the <prefix> subtree by importing its contents from the given <refspec> or <repository> and remote <refspec>\&. A new commit is created automatically, joining the imported project\(cqs history with your own\&. With
++\fI\-\-squash\fR, imports only a single commit from the subproject, rather than its entire history\&.
++.RE
++.PP
++merge
++.RS 4
++Merge recent changes up to <commit> into the <prefix> subtree\&. As with normal
++\fIgit merge\fR, this doesn\(cqt remove your own local changes; it just merges those changes into the latest <commit>\&. With
++\fI\-\-squash\fR, creates only one commit that contains all the changes, rather than merging in the entire history\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If you use \*(Aq\-\-squash\*(Aq, the merge direction doesn\*(Aqt
++always have to be forward; you can use this command to
++go back in time from v2\&.5 to v2\&.4, for example\&.  If your
++merge introduces a conflict, you can resolve it in the
++usual ways\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.PP
++pull
++.RS 4
++Exactly like
++\fImerge\fR, but parallels
++\fIgit pull\fR
++in that it fetches the given commit from the specified remote repository\&.
++.RE
++.PP
++push
++.RS 4
++Does a
++\fIsplit\fR
++(see above) using the <prefix> supplied and then does a
++\fIgit push\fR
++to push the result to the repository and refspec\&. This can be used to push your subtree to different branches of the remote repository\&.
++.RE
++.PP
++split
++.RS 4
++Extract a new, synthetic project history from the history of the <prefix> subtree\&. The new history includes only the commits (including merges) that affected <prefix>, and each of those commits now has the contents of <prefix> at the root of the project instead of in a subdirectory\&. Thus, the newly created history is suitable for export as a separate git repository\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++After splitting successfully, a single commit id is
++printed to stdout\&.  This corresponds to the HEAD of the
++newly created tree, which you can manipulate however you
++want\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Repeated splits of exactly the same history are
++guaranteed to be identical (ie\&. to produce the same
++commit ids)\&.  Because of this, if you add new commits
++and then re\-split, the new commits will be attached as
++commits on top of the history you generated last time,
++so \*(Aqgit merge\*(Aq and friends will work as expected\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Note that if you use \*(Aq\-\-squash\*(Aq when you merge, you
++should usually not just \*(Aq\-\-rejoin\*(Aq when you split\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.SH "OPTIONS"
++.PP
++\-q, \-\-quiet
++.RS 4
++Suppress unnecessary output messages on stderr\&.
++.RE
++.PP
++\-d, \-\-debug
++.RS 4
++Produce even more unnecessary output messages on stderr\&.
++.RE
++.PP
++\-P <prefix>, \-\-prefix=<prefix>
++.RS 4
++Specify the path in the repository to the subtree you want to manipulate\&. This option is mandatory for all commands\&.
++.RE
++.PP
++\-m <message>, \-\-message=<message>
++.RS 4
++This option is only valid for add, merge and pull (unsure)\&. Specify <message> as the commit message for the merge commit\&.
++.RE
++.SH "OPTIONS FOR ADD, MERGE, PUSH, PULL"
++.PP
++\-\-squash
++.RS 4
++This option is only valid for add, merge, push and pull commands\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Instead of merging the entire history from the subtree
++project, produce only a single commit that contains all
++the differences you want to merge, and then merge that
++new commit into your project\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Using this option helps to reduce log clutter\&. People
++rarely want to see every change that happened between
++v1\&.0 and v1\&.1 of the library they\*(Aqre using, since none of the
++interim versions were ever included in their application\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Using \*(Aq\-\-squash\*(Aq also helps avoid problems when the same
++subproject is included multiple times in the same
++project, or is removed and then re\-added\&.  In such a
++case, it doesn\*(Aqt make sense to combine the histories
++anyway, since it\*(Aqs unclear which part of the history
++belongs to which subtree\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Furthermore, with \*(Aq\-\-squash\*(Aq, you can switch back and
++forth between different versions of a subtree, rather
++than strictly forward\&.  \*(Aqgit subtree merge \-\-squash\*(Aq
++always adjusts the subtree to match the exactly
++specified commit, even if getting to that commit would
++require undoing some changes that were added earlier\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Whether or not you use \*(Aq\-\-squash\*(Aq, changes made in your
++local repository remain intact and can be later split
++and send upstream to the subproject\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.SH "OPTIONS FOR SPLIT"
++.PP
++\-\-annotate=<annotation>
++.RS 4
++This option is only valid for the split command\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++When generating synthetic history, add <annotation> as a
++prefix to each commit message\&.  Since we\*(Aqre creating new
++commits with the same commit message, but possibly
++different content, from the original commits, this can help
++to differentiate them and avoid confusion\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Whenever you split, you need to use the same
++<annotation>, or else you don\*(Aqt have a guarantee that
++the new re\-created history will be identical to the old
++one\&.  That will prevent merging from working correctly\&.
++git subtree tries to make it work anyway, particularly
++if you use \-\-rejoin, but it may not always be effective\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.PP
++\-b <branch>, \-\-branch=<branch>
++.RS 4
++This option is only valid for the split command\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++After generating the synthetic history, create a new
++branch called <branch> that contains the new history\&.
++This is suitable for immediate pushing upstream\&.
++<branch> must not already exist\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.PP
++\-\-ignore\-joins
++.RS 4
++This option is only valid for the split command\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If you use \*(Aq\-\-rejoin\*(Aq, git subtree attempts to optimize
++its history reconstruction to generate only the new
++commits since the last \*(Aq\-\-rejoin\*(Aq\&.  \*(Aq\-\-ignore\-join\*(Aq
++disables this behaviour, forcing it to regenerate the
++entire history\&.  In a large project, this can take a
++long time\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.PP
++\-\-onto=<onto>
++.RS 4
++This option is only valid for the split command\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If your subtree was originally imported using something
++other than git subtree, its history may not match what
++git subtree is expecting\&.  In that case, you can specify
++the commit id <onto> that corresponds to the first
++revision of the subproject\*(Aqs history that was imported
++into your project, and git subtree will attempt to build
++its history from there\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If you used \*(Aqgit subtree add\*(Aq, you should never need
++this option\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.PP
++\-\-rejoin
++.RS 4
++This option is only valid for the split command\&.
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++After splitting, merge the newly created synthetic
++history back into your main project\&.  That way, future
++splits can search only the part of history that has
++been added since the most recent \-\-rejoin\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If your split commits end up merged into the upstream
++subproject, and then you want to get the latest upstream
++version, this will allow git\*(Aqs merge algorithm to more
++intelligently avoid conflicts (since it knows these
++synthetic commits are already part of the upstream
++repository)\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++Unfortunately, using this option results in \*(Aqgit log\*(Aq
++showing an extra copy of every new commit that was
++created (the original, and the synthetic one)\&.
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++If you do all your merges with \*(Aq\-\-squash\*(Aq, don\*(Aqt use
++\*(Aq\-\-rejoin\*(Aq when you split, because you don\*(Aqt want the
++subproject\*(Aqs history to be part of your project anyway\&.
++.fi
++.if n \{\
++.RE
++.\}
++.RE
++.SH "EXAMPLE 1. ADD COMMAND"
++.sp
++Let\(cqs assume that you have a local repository that you would like to add an external vendor library to\&. In this case we will add the git\-subtree repository as a subdirectory of your already existing git\-extensions repository in ~/git\-extensions/:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree add \-\-prefix=git\-subtree \-\-squash \e
++        git://github\&.com/apenwarr/git\-subtree\&.git master
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++\fImaster\fR needs to be a valid remote ref and can be a different branch name
++.sp
++You can omit the \-\-squash flag, but doing so will increase the number of commits that are incldued in your local repository\&.
++.sp
++We now have a ~/git\-extensions/git\-subtree directory containing code from the master branch of git://github\&.com/apenwarr/git\-subtree\&.git in our git\-extensions repository\&.
++.SH "EXAMPLE 2. EXTRACT A SUBTREE USING COMMIT, MERGE AND PULL"
++.sp
++Let\(cqs use the repository for the git source code as an example\&. First, get your own copy of the git\&.git repository:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git clone git://git\&.kernel\&.org/pub/scm/git/git\&.git test\-git
++$ cd test\-git
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++gitweb (commit 1130ef3) was merged into git as of commit 0a8f4f0, after which it was no longer maintained separately\&. But imagine it had been maintained separately, and we wanted to extract git\(cqs changes to gitweb since that time, to share with the upstream\&. You could do this:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree split \-\-prefix=gitweb \-\-annotate=\*(Aq(split) \*(Aq \e
++        0a8f4f0^\&.\&. \-\-onto=1130ef3 \-\-rejoin \e
++        \-\-branch gitweb\-latest
++$ gitk gitweb\-latest
++$ git push git at github\&.com:whatever/gitweb\&.git gitweb\-latest:master
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++(We use \fI0a8f4f0^\&.\&.\fR because that means "all the changes from 0a8f4f0 to the current version, including 0a8f4f0 itself\&.")
++.sp
++If gitweb had originally been merged using \fIgit subtree add\fR (or a previous split had already been done with \-\-rejoin specified) then you can do all your splits without having to remember any weird commit ids:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree split \-\-prefix=gitweb \-\-annotate=\*(Aq(split) \*(Aq \-\-rejoin \e
++        \-\-branch gitweb\-latest2
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++And you can merge changes back in from the upstream project just as easily:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree pull \-\-prefix=gitweb \e
++        git at github\&.com:whatever/gitweb\&.git master
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++Or, using \fI\-\-squash\fR, you can actually rewind to an earlier version of gitweb:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree merge \-\-prefix=gitweb \-\-squash gitweb\-latest~10
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++Then make some changes:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ date >gitweb/myfile
++$ git add gitweb/myfile
++$ git commit \-m \*(Aqcreated myfile\*(Aq
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++And fast forward again:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree merge \-\-prefix=gitweb \-\-squash gitweb\-latest
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++And notice that your change is still intact:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ ls \-l gitweb/myfile
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++And you can split it out and look at your changes versus the standard gitweb:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++git log gitweb\-latest\&.\&.$(git subtree split \-\-prefix=gitweb)
++.fi
++.if n \{\
++.RE
++.\}
++.SH "EXAMPLE 3. EXTRACT A SUBTREE USING BRANCH"
++.sp
++Suppose you have a source directory with many files and subdirectories, and you want to extract the lib directory to its own git project\&. Here\(cqs a short way to do it:
++.sp
++First, make the new repository wherever you want:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ <go to the new location>
++$ git init \-\-bare
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++Back in your original directory:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git subtree split \-\-prefix=lib \-\-annotate="(split)" \-b split
++.fi
++.if n \{\
++.RE
++.\}
++.sp
++Then push the new branch onto the new empty repository:
++.sp
++.if n \{\
++.RS 4
++.\}
++.nf
++$ git push <new\-repo> split:master
++.fi
++.if n \{\
++.RE
++.\}
++.SH "AUTHOR"
++.sp
++Written by Avery Pennarun <\m[blue]\fBapenwarr at gmail\&.com\fR\m[]\&\s-2\u[1]\d\s+2>
++.SH "GIT"
++.sp
++Part of the \fBgit\fR(1) suite
++.SH "NOTES"
++.IP " 1." 4
++apenwarr at gmail.com
++.RS 4
++\%mailto:apenwarr at gmail.com
++.RE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121009/5ff3e421/attachment-0001.html>


More information about the macports-changes mailing list