Skip to content

Commit

Permalink
toolsets/repos: gt-* use ham-gt ;
Browse files Browse the repository at this point in the history
  • Loading branch information
prenaux committed Sep 14, 2022
1 parent 29d11af commit b780643
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 44 deletions.
8 changes: 3 additions & 5 deletions toolsets/repos/gt-co-branch
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} (nostash)"
echo ""
echo " 'gt branch checkout' with auto restack & auto stashing."
echo " 'ham-gt branch checkout' with auto restack & auto stashing."
exit 1
}

Expand All @@ -25,8 +23,8 @@ fi
(set -x ;
# Ignore error since we want to reapply the stash if its fails or we cancel it
set +e ;
gt branch checkout $1 ;
gt upstack restack)
ham-gt branch checkout $1 ;
ham-gt upstack restack)

if [ $STASH == 1 ]; then
(set -x ;
Expand Down
8 changes: 3 additions & 5 deletions toolsets/repos/gt-edit-stack
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} (nostash)"
echo ""
echo " 'gt downstack edit' with auto stashing and restacking."
echo " 'ham-gt downstack edit' with auto stashing and restacking."
exit 1
}

Expand All @@ -23,8 +21,8 @@ if [ $STASH == 1 ]; then
fi

(set -x;
gt downstack edit $@ ;
gt stack restack)
ham-gt downstack edit $@ ;
ham-gt stack restack)

if [ $STASH == 1 ]; then
(set -x ;
Expand Down
8 changes: 3 additions & 5 deletions toolsets/repos/gt-get
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} (nostash)"
echo ""
echo " 'gt downstack get' with auto stashing and restacking."
echo " 'ham-gt downstack get' with auto stashing and restacking."
exit 1
}

Expand All @@ -23,8 +21,8 @@ if [ $STASH == 1 ]; then
fi

(set -x;
gt dsg $@ ;
gt stack restack)
ham-gt dsg $@ ;
ham-gt stack restack)

if [ $STASH == 1 ]; then
(set -x ;
Expand Down
8 changes: 2 additions & 6 deletions toolsets/repos/gt-ls
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/}"
echo ""
echo " 'gt ls' list the current branches and display their stack."
echo " 'ham-gt ls' list the current branches and display their stack."
exit 1
}

(set -x;
gt ls)
ham-gt ls)
2 changes: 0 additions & 2 deletions toolsets/repos/gt-merge-current-branch
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} BRANCH_NAME(usually main or master) ORIGIN(default:origin)"
Expand Down
4 changes: 1 addition & 3 deletions toolsets/repos/gt-new-branch
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} BRANCH_NAME"
Expand All @@ -17,4 +15,4 @@ fi

(set -x ;
git-branch "$1" ;
gt branch track "$1")
ham-gt branch track "$1")
4 changes: 2 additions & 2 deletions toolsets/repos/gt-restack
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
usage() {
echo "usage: ${0##*/} (nostash)"
echo ""
echo " 'gt stack restack' with auto stashing."
echo " 'ham-gt stack restack' with auto stashing."
exit 1
}

Expand All @@ -19,7 +19,7 @@ if [ $STASH == 1 ]; then
fi

(set -x;
gt stack restack)
ham-gt stack restack)

if [ $STASH == 1 ]; then
(set -x ;
Expand Down
6 changes: 2 additions & 4 deletions toolsets/repos/gt-submit
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/}"
echo ""
echo " 'gt submit stack'."
echo " 'ham-gt submit stack'."
exit 1
}

(set -x;
gt-restack ;
gt stack submit)
ham-gt stack submit)
6 changes: 2 additions & 4 deletions toolsets/repos/gt-sync
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} (nostash)"
echo ""
echo " 'gt repo sync --restack' with auto stashing."
echo " 'ham-gt repo sync --restack' with auto stashing."
exit 1
}

Expand All @@ -22,7 +20,7 @@ if [ $STASH == 1 ]; then
git-stash push gt-sync)
fi

(set -x; gt repo sync --restack --show-delete-progress --delete --force)
(set -x; ham-gt repo sync --restack --show-delete-progress --delete --force)

if [ $STASH == 1 ]; then
(set -x ;
Expand Down
6 changes: 2 additions & 4 deletions toolsets/repos/gt-track-branch
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} MESSAGE"
echo ""
echo " 'gt branch track'"
echo " 'ham-gt branch track'"
exit 1
}

(set -x ;
gt branch track "$@")
ham-gt branch track "$@")
6 changes: 2 additions & 4 deletions toolsets/repos/gt-upstack-onto
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash -e
. "$HAM_HOME/bin/ham-bash-setenv.sh"
export HAM_NO_VER_CHECK=1
toolset_import_once nodejs > /dev/null

usage() {
echo "usage: ${0##*/} BRANCH_NAME"
echo ""
echo " 'gt upstack onto' Rebase the current branch onto the latest commit of the"
echo " 'ham-gt upstack onto' Rebase the current branch onto the latest commit of the"
echo " target branch and restack all of its descendants. If no branch is passed in,"
echo " opens an interactive selector."
exit 1
Expand All @@ -18,4 +16,4 @@ if [ -z "$1" ]; then
fi

(set -x ;
gt upstack onto "$@")
ham-gt upstack onto "$@")

0 comments on commit b780643

Please sign in to comment.