-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change should improve readability of test scripts.
- Loading branch information
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,15 @@ FILE_TO_MODIFY=file | |
|
||
repo-new() { | ||
if [[ -n "${GIT_REPO_DIR}" ]]; then | ||
testtee mkdir -p ${GIT_REPO_DIR} | ||
testtee cd ${GIT_REPO_DIR} | ||
testtee git init | ||
testtee git config --local user.email "\"[email protected]\"" | ||
testtee git config --local user.name "\"Elegant Git\"" | ||
testtee git config --local core.editor "\"edi\"" | ||
testtee touch ${FILE_TO_MODIFY} | ||
testtee git add . | ||
testtee git commit -m "\"Add ${FILE_TO_MODIFY}\"" | ||
perform-verbose mkdir -p ${GIT_REPO_DIR} | ||
perform-verbose cd ${GIT_REPO_DIR} | ||
perform-verbose git init | ||
perform-verbose git config --local user.email "\"[email protected]\"" | ||
perform-verbose git config --local user.name "\"Elegant Git\"" | ||
perform-verbose git config --local core.editor "\"edi\"" | ||
perform-verbose touch ${FILE_TO_MODIFY} | ||
perform-verbose git add . | ||
perform-verbose git commit -m "\"Add ${FILE_TO_MODIFY}\"" | ||
else | ||
exit 1 | ||
fi | ||
|
@@ -23,21 +23,21 @@ repo-new() { | |
repo-non-staged-change(){ | ||
# modifies committed file | ||
# usage: repo-non-staged-change <text>... | ||
testtee "echo -e \"${@}\" >> ${FILE_TO_MODIFY}" | ||
perform-verbose "echo -e \"${@}\" >> ${FILE_TO_MODIFY}" | ||
} | ||
|
||
repo-staged-change(){ | ||
# modifies committed file and stages changes | ||
# usage: repo-staged-change <text>... | ||
repo-non-staged-change "${@}" | ||
testtee git add ${FILE_TO_MODIFY} | ||
perform-verbose git add ${FILE_TO_MODIFY} | ||
} | ||
|
||
repo() { | ||
# execute given arguments on real git repo | ||
# usage: repo <command and arguments> | ||
testtee cd ${GIT_REPO_DIR} | ||
testtee "${@}" | ||
perform-verbose cd ${GIT_REPO_DIR} | ||
perform-verbose "${@}" | ||
} | ||
|
||
repo-clean() { | ||
|