diff options
author | David A. Greene <greened@obbligato.org> | 2013-02-04 22:06:04 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-05 15:23:05 -0800 |
commit | 111dc0eea07d4843a9ed86e4069b899224a4489b (patch) | |
tree | a3dba2e5519b8e8ee3bde7ba7d7b8d889c7f5772 /contrib/subtree/git-subtree.sh | |
parent | 10a49587fabde88c0afbc80a99d97fae91811f5f (diff) | |
download | git-111dc0eea07d4843a9ed86e4069b899224a4489b.tar.gz |
contrib/subtree: fix synopsis
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/subtree/git-subtree.sh')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 771f39d031..8a23f58ba0 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...> @@ -502,6 +503,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" |