From: "David A. Greene" <greened@obbligato.org>
To: git@vger.kernel.org
Cc: "David A. Greene" <greened@obbligato.org>
Subject: [PATCH 5/7] contrib/subtree: Fix Synopsis
Date: Tue, 8 Jan 2013 06:09:55 -0600 [thread overview]
Message-ID: <1357646997-28675-6-git-send-email-greened@obbligato.org> (raw)
In-Reply-To: <1357646997-28675-1-git-send-email-greened@obbligato.org>
From: "David A. Greene" <greened@obbligato.org>
Fix the documentation of add to show that a repository can be
specified along with a commit.
Suggested by Yann Dirson <dirson@bertin.fr>.
Signed-off-by: David A. Greene <greened@obbligato.org>
---
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=<prefix> <commit>
+git subtree add --prefix=<prefix> <repository> <commit>
git subtree merge --prefix=<prefix> <commit>
git subtree pull --prefix=<prefix> <repository> <refspec...>
git subtree push --prefix=<prefix> <repository> <refspec...>
@@ -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 <prefix> <commit>
+'git subtree' add -P <prefix> <refspec>
+'git subtree' add -P <prefix> <repository> <refspec>
'git subtree' pull -P <prefix> <repository> <refspec...>
'git subtree' push -P <prefix> <repository> <refspec...>
'git subtree' merge -P <prefix> <commit>
--
1.7.10.4
next prev parent reply other threads:[~2013-01-08 12:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 12:09 Revised git-subtree Patches David A. Greene
2013-01-08 12:09 ` [PATCH 1/7] Remove Test Number Comments David A. Greene
2013-01-08 12:09 ` [PATCH 2/7] contrib/subtree: Use %B for Split Subject/Body David A. Greene
2013-01-08 18:29 ` Junio C Hamano
2013-01-16 3:14 ` greened
2013-01-08 23:21 ` 郑文辉(Techlive Zheng)
2013-01-09 0:41 ` Junio C Hamano
2013-01-16 3:18 ` greened
2013-01-16 15:43 ` Junio C Hamano
2013-01-22 8:39 ` greened
2013-01-08 12:09 ` [PATCH 3/7] contrib/subtree: Add --unannotate David A. Greene
2013-01-08 18:45 ` Junio C Hamano
2013-01-16 3:20 ` greened
2013-01-16 4:06 ` greened
2013-01-16 4:31 ` Junio C Hamano
2013-01-22 8:37 ` greened
2013-01-08 12:09 ` [PATCH 4/7] contrib/subtree: Better Error Handling for add David A. Greene
2013-01-08 18:45 ` Junio C Hamano
2013-01-16 3:21 ` greened
2013-01-08 12:09 ` David A. Greene [this message]
2013-01-08 12:09 ` [PATCH 6/7] contrib/subtree: Honor DESTDIR David A. Greene
2013-01-08 12:09 ` [PATCH 7/7] contrib/subtree: Make the Manual Directory if Needed David A. Greene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357646997-28675-6-git-send-email-greened@obbligato.org \
--to=greened@obbligato.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).