shithub: riscv

Download patch

ref: a271f62bf298b2ac236418dc581ec79c55a70816
parent: 3d047ddf03b9f977073427db7de98192ca0af351
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Apr 27 23:35:54 EDT 2022

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

we do the right thing by default now, let's not
add knobs that nobody cares about.

--- a/sys/man/1/git
+++ b/sys/man/1/git
@@ -13,9 +13,6 @@
 ]
 .I path...
 .PP
-.B git/rm
-.I path...
-.PP
 .B git/branch
 [
 .B -admns
@@ -69,13 +66,6 @@
 .I file...
 ]
 .PP
-.B git/revert
-[
-.B -c
-.I commit
-]
-.I file...
-.PP
 .B git/export
 [
 .I commits...
@@ -125,15 +115,9 @@
 .PP
 .B git/pull
 [
-.B -f
+.B -fq
 ]
 [
-.B -q
-]
-[
-.B -a
-]
-[
 .B -u
 .I upstream
 ]
@@ -140,7 +124,7 @@
 .PP
 .B git/push
 [
-.B -a
+.B -af
 ]
 [
 .B -u
@@ -155,6 +139,22 @@
 .I branch
 ]
 .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 -w
@@ -164,12 +164,6 @@
 .I path
 ]
 .PP
-.B git/query
-[
-.B -pcr
-]
-.I query
-.PP
 .B git/walk
 [
 .B -qc
@@ -282,10 +276,17 @@
 .I -f
 option, the update of the working copy is suppressed.
 When passed the
+.I -q
+option, the listing of changes is silenced.
+When passed the
 .I -u upstream
 option, the changes are pulled from
 .I upstream
 instead of the configured origin.
+when passed the
+.I -b branch
+option, it only pulls changes related to
+.IR branch .
 
 .PP
 .B Git/serve
@@ -513,10 +514,10 @@
 Modified since last commit.
 .TP
 R
-Removed from either working directory tracking list.
+This file will be gone in the next commit.
 .TP
 A
-Added, does not yet exist in a commit.
+This file will be present in the next commit.
 
 .PP
 .B Git/compat
@@ -642,7 +643,7 @@
 .IR replica (1),
 .IR patch (1),
 .IR gitfs (4),
-.IR diff3
+.I diff3
 
 .SH BUGS
 .PP
--- a/sys/src/cmd/git/pull
+++ b/sys/src/cmd/git/pull
@@ -3,10 +3,9 @@
 . /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 @@
 
 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 @@
 	upstream=THEM
 }
 
-update $branch $upstream $remote
+update $upstream $remote
 if (~ $fetchonly 1)
 	exit
 
@@ -73,7 +67,6 @@
 # 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 ''