From 1d58fa41d35f2819ec5bd605e6471beb3f2587f0 Mon Sep 17 00:00:00 2001 From: Gaetan Semet Date: Thu, 17 Apr 2014 16:01:48 +0200 Subject: [PATCH] New aliases for repo Signed-off-by: Gaetan Semet --- plugins/repo/repo.plugin.zsh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/plugins/repo/repo.plugin.zsh b/plugins/repo/repo.plugin.zsh index 89d2b8e1f..43baad47e 100644 --- a/plugins/repo/repo.plugin.zsh +++ b/plugins/repo/repo.plugin.zsh @@ -33,3 +33,30 @@ compdef _repo rscb='repo start' # Repo start and rebase current branch on all projects alias rscbrra='echo "Starting & Rebasing branch $(git branch | sed -n "/\* /s///p") on all projects" && rscb && echo "Rebasing..." && rra' compdef _repo rscbrra='repo rebase' + +# Repo start and rebase current branch on all projects +alias rscbrsrra='echo "Starting & Rebasing branch $(git branch | sed -n "/\* /s///p") on all projects" && rscb && echo "Sync & Rebasing..." && rsrra' +compdef _repo rscbrsrra='repo rebase' + +function rsbrra() +{ + if [[ -z $1 ]]; then + echo "usage: rsbrra " + exit 1 + fi + echo "Starting branch $1 and syncing up all project (repo rebase)" + repo start $1 --all + repo rebase --auto-stash +} + +function rsbrsrra() +{ + if [[ -z $1 ]]; then + echo "usage: rsbrsrra " + exit 1 + fi + echo "Starting branch $1 and syncing up all project (repo rebase)" + repo start $1 --all || return 1 + repo sync || return 1 + repo rebase --auto-stash || return 1 +}