git/pull: remove '-b' and '-a' option

we do the right thing by default now, let's not
add knobs that nobody cares about.
This commit is contained in:
Ori Bernstein 2022-04-28 03:35:54 +00:00
parent 3d047ddf03
commit a271f62bf2
2 changed files with 34 additions and 40 deletions

View file

@ -13,9 +13,6 @@ git/pull, git/rm, git/serve
] ]
.I path... .I path...
.PP .PP
.B git/rm
.I path...
.PP
.B git/branch .B git/branch
[ [
.B -admns .B -admns
@ -69,13 +66,6 @@ git/pull, git/rm, git/serve
.I file... .I file...
] ]
.PP .PP
.B git/revert
[
.B -c
.I commit
]
.I file...
.PP
.B git/export .B git/export
[ [
.I commits... .I commits...
@ -125,13 +115,7 @@ git/pull, git/rm, git/serve
.PP .PP
.B git/pull .B git/pull
[ [
.B -f .B -fq
]
[
.B -q
]
[
.B -a
] ]
[ [
.B -u .B -u
@ -140,7 +124,7 @@ git/pull, git/rm, git/serve
.PP .PP
.B git/push .B git/push
[ [
.B -a .B -af
] ]
[ [
.B -u .B -u
@ -155,6 +139,22 @@ git/pull, git/rm, git/serve
.I branch .I branch
] ]
.PP .PP
.B git/query
[
.B -pcr
]
.I query
.PP
.B git/revert
[
.B -c
.I commit
]
.I file...
.PP
.B git/rm
.I path...
.PP
.B git/serve .B git/serve
[ [
.B -w .B -w
@ -164,12 +164,6 @@ git/pull, git/rm, git/serve
.I path .I path
] ]
.PP .PP
.B git/query
[
.B -pcr
]
.I query
.PP
.B git/walk .B git/walk
[ [
.B -qc .B -qc
@ -282,10 +276,17 @@ When passed the
.I -f .I -f
option, the update of the working copy is suppressed. option, the update of the working copy is suppressed.
When passed the When passed the
.I -q
option, the listing of changes is silenced.
When passed the
.I -u upstream .I -u upstream
option, the changes are pulled from option, the changes are pulled from
.I upstream .I upstream
instead of the configured origin. instead of the configured origin.
when passed the
.I -b branch
option, it only pulls changes related to
.IR branch .
.PP .PP
.B Git/serve .B Git/serve
@ -513,10 +514,10 @@ M
Modified since last commit. Modified since last commit.
.TP .TP
R R
Removed from either working directory tracking list. This file will be gone in the next commit.
.TP .TP
A A
Added, does not yet exist in a commit. This file will be present in the next commit.
.PP .PP
.B Git/compat .B Git/compat
@ -642,7 +643,7 @@ The contents of this file are used as fallbacks for the per-user config.
.IR replica (1), .IR replica (1),
.IR patch (1), .IR patch (1),
.IR gitfs (4), .IR gitfs (4),
.IR diff3 .I diff3
.SH BUGS .SH BUGS
.PP .PP

View file

@ -3,10 +3,9 @@ rfork en
. /sys/lib/git/common.rc . /sys/lib/git/common.rc
fn update{ fn update{
branch=$1 upstream=$1
upstream=$2 url=$2
url=$3 dir=$3
dir=$4
dflag=() dflag=()
if(! ~ $#debug 0) if(! ~ $#debug 0)
dflag='-d' dflag='-d'
@ -27,16 +26,11 @@ fn update{
gitup gitup
flagfmt='a:allbranch, b:branch branch, d:debug, flagfmt='d:debug, q:quiet, f:fetchonly,
f:fetchonly, u:upstream upstream, q:quiet' u:upstream upstream'
args='' args=''
eval `''{aux/getflags $*} || exec aux/usage eval `''{aux/getflags $*} || exec aux/usage
if(~ $#branch 0)
branch=refs/`{git/branch}
if(~ $allbranch 1)
branch=''
if(~ $#upstream 0) if(~ $#upstream 0)
upstream=origin upstream=origin
remote=`$nl{git/conf 'remote "'$upstream'".url'} remote=`$nl{git/conf 'remote "'$upstream'".url'}
@ -45,7 +39,7 @@ if(~ $#remote 0){
upstream=THEM upstream=THEM
} }
update $branch $upstream $remote update $upstream $remote
if (~ $fetchonly 1) if (~ $fetchonly 1)
exit exit
@ -73,7 +67,6 @@ if(! ~ `{git/query HEAD $remote @} `{git/query HEAD}){
# no local commits that need merging. # no local commits that need merging.
if(~ $#quiet 0) if(~ $#quiet 0)
git/log -s -e $local'..'$remote git/log -s -e $local'..'$remote
echo
echo $remote':' `{git/query $local} '=>' `{git/query $remote} echo $remote':' `{git/query $local} '=>' `{git/query $remote}
git/branch -mnb $remote $local git/branch -mnb $remote $local
exit '' exit ''