diff options
| author | Matthew Ogilvie <mmogilvi_git@miniinfo.net> | 2013-12-07 11:21:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-12-10 14:43:09 -0800 |
| commit | 01dad8c2a7a6e417ab1b794d9b183516c5448c83 (patch) | |
| tree | 35f9f2421b26bcda9b71658228652633f205185d /contrib/subtree/git-subtree.sh | |
| parent | 2e5c151a03c68a2a4cc13e627f8d749baac7fe89 (diff) | |
| download | git-01dad8c2a7a6e417ab1b794d9b183516c5448c83.tar.gz | |
subtree: allow --squash and --message with push
Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
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 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 998a9c54f1..56d915f67f 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -743,11 +743,17 @@ cmd_push() if [ $# -ne 2 ]; then die "You must provide <repository> <refspec>" fi + + opts= + if [ -n "$squash" ]; then + opts="-squash" + fi + if [ -e "$dir" ]; then repository=$1 refspec=$2 echo "git push using: " $repository $refspec - localrev=$(git subtree split --prefix="$prefix") || die + localrev=$(git subtree split --prefix="$prefix" $opts --message="$message") || die git push $repository $localrev:refs/heads/$refspec else die "'$dir' must already exist. Try 'git subtree add'." |
