mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
more patchset
This commit is contained in:
parent
652cd37282
commit
a2877a2b05
1 changed files with 22 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ function gerrit_usage {
|
||||||
echo " try these :";
|
echo " try these :";
|
||||||
echo " push Push changes without going through a review. ";
|
echo " push Push changes without going through a review. ";
|
||||||
echo " pull Pull latest changes and rebase ... or something. ";
|
echo " pull Pull latest changes and rebase ... or something. ";
|
||||||
|
echo " patch Work with gerrit patchset";
|
||||||
echo " review Push changes and submit changes for review";
|
echo " review Push changes and submit changes for review";
|
||||||
echo " setup-reviewers Set current repo to automatically have reviewers from your team";
|
echo " setup-reviewers Set current repo to automatically have reviewers from your team";
|
||||||
echo " add-reviewer Add a reviewer to the repo";
|
echo " add-reviewer Add a reviewer to the repo";
|
||||||
|
|
@ -13,6 +14,17 @@ function gerrit_usage {
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gerrit_patch_usage () {
|
||||||
|
echo
|
||||||
|
echo " usage: gerrit patch <command>";
|
||||||
|
echo
|
||||||
|
echo " try these :";
|
||||||
|
echo
|
||||||
|
echo " commit amend the patchset commit";
|
||||||
|
echo " review push the patchset back to the gerrit review";
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
function gerrit_push () {
|
function gerrit_push () {
|
||||||
git push origin HEAD:refs/heads/$1;
|
git push origin HEAD:refs/heads/$1;
|
||||||
}
|
}
|
||||||
|
|
@ -27,6 +39,15 @@ function gerrit_pull () {
|
||||||
git rebase origin/$1
|
git rebase origin/$1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gerrit_patch () {
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
gerrit_patch_usage;
|
||||||
|
else
|
||||||
|
[ $1 = "commit" ] && git commit --amend;
|
||||||
|
[ $1 = "review" ] && gerrit_review "master";
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function gerrit_clone () {
|
function gerrit_clone () {
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
echo "$yellow Please supply the name of a repo to clone. $stop"
|
echo "$yellow Please supply the name of a repo to clone. $stop"
|
||||||
|
|
@ -77,6 +98,7 @@ function gerrit () {
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
gerrit_usage;
|
gerrit_usage;
|
||||||
else
|
else
|
||||||
|
[ $1 = "patch" ] && gerrit_patch $2
|
||||||
[ $1 = "push" ] && gerrit_push $branch;
|
[ $1 = "push" ] && gerrit_push $branch;
|
||||||
[ $1 = "review" ] && gerrit_review $branch;
|
[ $1 = "review" ] && gerrit_review $branch;
|
||||||
[ $1 = "pull" ] && gerrit_pull $branch;
|
[ $1 = "pull" ] && gerrit_pull $branch;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue