summaryrefslogtreecommitdiff
path: root/sys/src/cmd/git
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-12-20 15:16:29 +0000
committerOri Bernstein <ori@eigenstate.org>2021-12-20 15:16:29 +0000
commitc947bf80874168f8bd3786c0ccb473cd5e6adbcb (patch)
treef245fdd3b4815fcf4ca3e41cb805f913733e69e9 /sys/src/cmd/git
parent614f1d6268fd986fc628eec3754bd4599363ad13 (diff)
git: fetch all branches by default.
when the remote side creates a new branch, it is desirable to have it show up in the repo.
Diffstat (limited to 'sys/src/cmd/git')
-rw-r--r--sys/src/cmd/git/fetch.c2
-rwxr-xr-xsys/src/cmd/git/pull5
2 files changed, 2 insertions, 5 deletions
diff --git a/sys/src/cmd/git/fetch.c b/sys/src/cmd/git/fetch.c
index 5951cfaf7..447c71a7c 100644
--- a/sys/src/cmd/git/fetch.c
+++ b/sys/src/cmd/git/fetch.c
@@ -260,7 +260,7 @@ fetchpack(Conn *c)
if(writepkt(c, buf, n) == -1)
sysfatal("write: %r");
if(!req)
- return 0;
+ goto showrefs;
if(readphase(c) == -1)
sysfatal("read: %r");
if((n = readpkt(c, buf, sizeof(buf))) == -1)
diff --git a/sys/src/cmd/git/pull b/sys/src/cmd/git/pull
index 189323f97..4b84a9f8a 100755
--- a/sys/src/cmd/git/pull
+++ b/sys/src/cmd/git/pull
@@ -7,13 +7,10 @@ fn update{
upstream=$2
url=$3
dir=$4
- bflag=()
dflag=()
- if(! ~ $#branch 0)
- bflag=(-b $branch)
if(! ~ $#debug 0)
dflag='-d'
- {git/fetch $dflag $bflag -u $upstream $url >[2=3] || die $status} | awk '
+ {git/fetch $dflag -u $upstream $url >[2=3] || die $status} | awk '
/^remote/{
if($2=="HEAD")
next