From: Ori Bernstein Date: Wed, 25 Aug 2021 02:24:15 +0000 (+0000) Subject: git/compat: add support for ls-remote [-d] X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9ca6ca345fa3b06dbf35e7808c35c0aaa7aa3bec;p=plan9front.git git/compat: add support for ls-remote [-d] This is used by 'go get' sometimes, so add it. --- diff --git a/sys/src/cmd/git/compat b/sys/src/cmd/git/compat index 15eb261e4..f0c7fce42 100755 --- a/sys/src/cmd/git/compat +++ b/sys/src/cmd/git/compat @@ -125,6 +125,15 @@ fn cmd_remote{ } } +fn cmd_ls-remote{ + if(~ $1 -q) + shift + remote=`$nl{git/conf 'remote "'$1'".url'} + if(~ $#remote 0) + remote=$1 + git/fetch -l $remote | awk '/^remote/{print $3"\t"$2}' +} + fn cmd_version{ echo git version 2.2.0 } @@ -154,5 +163,6 @@ if(! test -f '/env/fn#cmd_'$1) if(! ~ $1 init && ! ~ $1 clone) gitroot=`{git/conf -r} || die repo +echo $* >/tmp/gitlog cmd_$1 $*(2-) exit ''