simplify got-push by switching to "got info"
This commit is contained in:
parent
110c609fc2
commit
e36a8e8a4e
@ -3,16 +3,8 @@
|
||||
# Thanks to jrick for this one:
|
||||
# https://gist.github.com/jrick/d47e1be98609401e86ba0bd6bfbfc8fe
|
||||
function got-push {
|
||||
local p="$PWD"
|
||||
while [ ! -e "$p/.got/repository" ]; do
|
||||
if [ "$p" = "/" ]; then
|
||||
echo "$PWD: not a got checkout" 1>&2
|
||||
return 1
|
||||
fi
|
||||
p=$(dirname "$p")
|
||||
done
|
||||
local r
|
||||
read r < "$p/.got/repository"
|
||||
r=$(got info | awk '$1 ~ "^repository:" {print $2}')
|
||||
(cd "$r" && git push "$@")
|
||||
}
|
||||
|
||||
|
@ -80,4 +80,3 @@ reload() {
|
||||
reload_completions
|
||||
reload_extensions
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user