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.
This commit is contained in:
parent
614f1d6268
commit
c947bf8087
2 changed files with 2 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue