Skip to content
Snippets Groups Projects
Commit dd7d9c4d authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'update-gitsetup'


36aaa50f Merge branch 'upstream-GitSetup' into update-gitsetup
e1e593f1 GitSetup 2017-10-23 (34f17af6)

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: default avatarBrad King <brad.king@kitware.com>
Merge-request: !3473
parents bc8b0a56 36aaa50f
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,9 @@ OPTIONS
--no-topic
Do not push the topic HEAD.
--no-upstream
Do not set an upstream branch (i.e. tracking) for the topic
'
OPTIONS_SPEC=
SUBDIRECTORY_OK=Yes
......@@ -109,16 +112,18 @@ no_topic=''
no_default=''
no_data=''
dry_run=''
set_upstream=true
# Parse the command line options.
while test $# != 0; do
case "$1" in
-f|--force) force='+'; lease=true ;;
--keep-data) keep_data=1 ;;
--no-topic) no_topic=1 ;;
--no-data) no_data=1 ;;
--dry-run) dry_run=--dry-run ;;
--no-default) no_default=1 ;;
-f|--force) force='+'; lease=true ;;
--keep-data) keep_data=1 ;;
--no-topic) no_topic=1; set_upstream=false ;;
--no-data) no_data=1 ;;
--dry-run) dry_run=--dry-run ;;
--no-default) no_default=1 ;;
--no-upstream) set_upstream=false ;;
--) shift; break ;;
-*) usage ;;
*) test -z "$remote" || usage ; remote="$1" ;;
......@@ -238,6 +243,8 @@ not pushing an outdated branch."
echo '
Add "-f" or "--force" to push a rewritten topic.'
fi
elif $set_upstream && test -n "$topic"; then
git branch -u "$remote/$topic"
fi
# Reproduce the push exit code.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment