Commit 54b543c9 authored by Kenneth Moreland's avatar Kenneth Moreland

Merge branch 'upstream-GitSetup'

* upstream-GitSetup:
  GitSetup 2017-10-23 (34f17af6)
parents ab10ff3b c93fc348
......@@ -30,6 +30,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
......@@ -65,14 +68,16 @@ lease_flag=''
no_topic=''
no_default=''
dry_run=''
set_upstream=true
# Parse the command line options.
while test $# != 0; do
case "$1" in
-f|--force) force='+'; lease=true ;;
--no-topic) no_topic=1 ;;
--dry-run) dry_run=--dry-run ;;
--no-default) no_default=1 ;;
-f|--force) force='+'; lease=true ;;
--no-topic) no_topic=1; set_upstream=false ;;
--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" ;;
......@@ -175,6 +180,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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment