diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-12-22 00:48:09 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-12-22 00:48:09 +0000 |
commit | facb0e757ac63f763bd942a2714f979538b99eb0 (patch) | |
tree | 0468672e3476e511a7b585f4f47f39cbae5f48bc /sys/src/cmd/git | |
parent | c947bf80874168f8bd3786c0ccb473cd5e6adbcb (diff) |
git: revert c947bf808 -- it triggers a bug.
We seem to have a botch in the protocol negotiation, where
we leak some protocol packets into the packfile; this will
need to be fixed before we put this change in.
Diffstat (limited to 'sys/src/cmd/git')
-rw-r--r-- | sys/src/cmd/git/fetch.c | 2 | ||||
-rwxr-xr-x | sys/src/cmd/git/pull | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/src/cmd/git/fetch.c b/sys/src/cmd/git/fetch.c index 447c71a7c..5951cfaf7 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) - goto showrefs; + return 0; 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 4b84a9f8a..189323f97 100755 --- a/sys/src/cmd/git/pull +++ b/sys/src/cmd/git/pull @@ -7,10 +7,13 @@ fn update{ upstream=$2 url=$3 dir=$4 + bflag=() dflag=() + if(! ~ $#branch 0) + bflag=(-b $branch) if(! ~ $#debug 0) dflag='-d' - {git/fetch $dflag -u $upstream $url >[2=3] || die $status} | awk ' + {git/fetch $dflag $bflag -u $upstream $url >[2=3] || die $status} | awk ' /^remote/{ if($2=="HEAD") next |