Skip to content

Commit

Permalink
git-pr and no control master
Browse files Browse the repository at this point in the history
Signed-off-by: Egor Kovetskiy <[email protected]>
  • Loading branch information
kovetskiy committed Aug 25, 2023
1 parent ba48e69 commit 2b96b97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .ssh/config
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Host air
User operator

Host *
ControlMaster auto
ControlPersist 10m
ControlPath ~/.cache/ssh_%r_%h_%p
Compression yes
User root
#SendEnv TERM=xterm
Expand Down
14 changes: 13 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,15 @@ rc() {
}

git-pr() {
git fetch origin pull/$1/head:pr-$1 || git fetch upstream pull/$1/head:pr-$1
local branch=$(:git:branch)
if [[ "$branch" == "pr-$1" ]]; then
:git:master
fi
git branch -D pr-$1 2>/dev/null
for remote in origin upstrea; do
git fetch $remote pull/$1/head:pr-$1 2>/dev/null
done

git checkout pr-$1
}

Expand Down Expand Up @@ -1659,6 +1667,10 @@ alias kv='tubectl get events'
alias gob='go build'
alias goi='go install'

alias ain='() { dir=$(ai-new "${@}") && cd "${dir}" }'
alias viq='vim question.md'
alias ask='ai-ask'

alias -g -- '\kya'='-o yaml'
alias -g -- '\kow'='-o wide'

Expand Down

0 comments on commit 2b96b97

Please sign in to comment.