From a271f62bf298b2ac236418dc581ec79c55a70816 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Thu, 28 Apr 2022 03:35:54 +0000 Subject: git/pull: remove '-b' and '-a' option we do the right thing by default now, let's not add knobs that nobody cares about. --- sys/src/cmd/git/pull | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'sys/src/cmd/git') diff --git a/sys/src/cmd/git/pull b/sys/src/cmd/git/pull index a4c4ce8eb..10fbf626b 100755 --- a/sys/src/cmd/git/pull +++ b/sys/src/cmd/git/pull @@ -3,10 +3,9 @@ rfork en . /sys/lib/git/common.rc fn update{ - branch=$1 - upstream=$2 - url=$3 - dir=$4 + upstream=$1 + url=$2 + dir=$3 dflag=() if(! ~ $#debug 0) dflag='-d' @@ -27,16 +26,11 @@ fn update{ gitup -flagfmt='a:allbranch, b:branch branch, d:debug, - f:fetchonly, u:upstream upstream, q:quiet' +flagfmt='d:debug, q:quiet, f:fetchonly, + u:upstream upstream' args='' eval `''{aux/getflags $*} || exec aux/usage -if(~ $#branch 0) - branch=refs/`{git/branch} -if(~ $allbranch 1) - branch='' - if(~ $#upstream 0) upstream=origin remote=`$nl{git/conf 'remote "'$upstream'".url'} @@ -45,7 +39,7 @@ if(~ $#remote 0){ upstream=THEM } -update $branch $upstream $remote +update $upstream $remote if (~ $fetchonly 1) exit @@ -73,7 +67,6 @@ if(! ~ `{git/query HEAD $remote @} `{git/query HEAD}){ # no local commits that need merging. if(~ $#quiet 0) git/log -s -e $local'..'$remote -echo echo $remote':' `{git/query $local} '=>' `{git/query $remote} git/branch -mnb $remote $local exit '' -- cgit v1.2.3