From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David A. Greene" Subject: [PATCH 5/7] contrib/subtree: Fix Synopsis Date: Tue, 8 Jan 2013 06:09:55 -0600 Message-ID: <1357646997-28675-6-git-send-email-greened@obbligato.org> References: <1357646997-28675-1-git-send-email-greened@obbligato.org> Cc: "David A. Greene" To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Jan 08 13:11:38 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TsY1n-0002Gu-Rx for gcvg-git-2@plane.gmane.org; Tue, 08 Jan 2013 13:11:36 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756058Ab3AHMLJ (ORCPT ); Tue, 8 Jan 2013 07:11:09 -0500 Received: from li209-253.members.linode.com ([173.255.199.253]:51758 "EHLO johnson.obbligato.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755964Ab3AHMLI (ORCPT ); Tue, 8 Jan 2013 07:11:08 -0500 Received: from c-75-73-20-8.hsd1.mn.comcast.net ([75.73.20.8] helo=waller.obbligato.org) by johnson.obbligato.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1TsY8v-0003z5-El; Tue, 08 Jan 2013 06:18:58 -0600 X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1357646997-28675-1-git-send-email-greened@obbligato.org> X-Filter-Spam-Score: -2.9 (--) X-Filter-Spam-Report: Spam detection software, running on the system "johnson.obbligato.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: From: "David A. Greene" Fix the documentation of add to show that a repository can be specified along with a commit. Suggested by Yann Dirson . [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: From: "David A. Greene" Fix the documentation of add to show that a repository can be specified along with a commit. Suggested by Yann Dirson . Signed-off-by: David A. Greene --- contrib/subtree/git-subtree.sh | 6 ++++++ contrib/subtree/git-subtree.txt | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index d53eaee..0e9ea0f 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -9,6 +9,7 @@ if [ $# -eq 0 ]; then fi OPTS_SPEC="\ git subtree add --prefix= +git subtree add --prefix= git subtree merge --prefix= git subtree pull --prefix= git subtree push --prefix= @@ -513,6 +514,11 @@ cmd_add() "cmd_add_commit" "$@" elif [ $# -eq 2 ]; then + # Technically we could accept a refspec here but we're + # just going to turn around and add FETCH_HEAD under the + # specified directory. Allowing a refspec might be + # misleading because we won't do anything with any other + # branches fetched via the refspec. git rev-parse -q --verify "$2^{commit}" >/dev/null || die "'$2' does not refer to a commit" diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt index 75aa690..078d4ac 100644 --- a/contrib/subtree/git-subtree.txt +++ b/contrib/subtree/git-subtree.txt @@ -9,7 +9,8 @@ git-subtree - Merge subtrees together and split repository into subtrees SYNOPSIS -------- [verse] -'git subtree' add -P +'git subtree' add -P +'git subtree' add -P 'git subtree' pull -P 'git subtree' push -P 'git subtree' merge -P -- 1.7.10.4