Add extensions for got.
This commit is contained in:
parent
967657a774
commit
9626a34259
17
extensions/got.ksh
Executable file
17
extensions/got.ksh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/ksh
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
(cd "$r" && git push $*)
|
||||||
|
}
|
8
extensions/got.org
Normal file
8
extensions/got.org
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
* got
|
||||||
|
|
||||||
|
This extension adds helper functions to the [[https://gameoftrees.org/][got]] tool.
|
||||||
|
|
||||||
|
| Function | Description |
|
||||||
|
|------------+-------------------------------------------------------------------------|
|
||||||
|
| ~got-push~ | Pushes (~git push~) from the bare repository found in ~.got/repository~ |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user