diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-08-25 02:24:15 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-08-25 02:24:15 +0000 |
commit | 9ca6ca345fa3b06dbf35e7808c35c0aaa7aa3bec (patch) | |
tree | bff61139b33d29c7c51dc35c84868ea39d806dd1 | |
parent | ad26f82e44a5f59383edfde5f4c3727c225f4b0a (diff) | |
download | plan9front-9ca6ca345fa3b06dbf35e7808c35c0aaa7aa3bec.tar.xz |
git/compat: add support for ls-remote [-d]
This is used by 'go get' sometimes, so add it.
-rwxr-xr-x | sys/src/cmd/git/compat | 10 |
1 files changed, 10 insertions, 0 deletions
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 '' |