Fix a typo in a function name

This commit is contained in:
Andrew Lorente
2011-10-20 13:46:40 -07:00
parent bf5d50fcb8
commit 99e4e9dcda
3 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ _alias $git_alias='git'
# SCM Breeze functions # SCM Breeze functions
_alias $git_status_shortcuts_alias="git_status_shortcuts" _alias $git_status_shortcuts_alias="git_status_shortcuts"
_alias $git_add_shortcuts_alias="git_add_shorcuts" _alias $git_add_shortcuts_alias="git_add_shortcuts"
_alias $exec_git_expand_args_alias="exec_git_expand_args" _alias $exec_git_expand_args_alias="exec_git_expand_args"
_alias $git_show_files_alias="git_show_affected_files" _alias $git_show_files_alias="git_show_affected_files"
_alias $git_commit_all_alias='git_commit_all' _alias $git_commit_all_alias='git_commit_all'

View File

@@ -44,7 +44,7 @@ git_status_shortcuts() {
# Should be used in conjunction with the git_status_shortcuts() function for 'git status'. # Should be used in conjunction with the git_status_shortcuts() function for 'git status'.
# - 'auto git rm' behaviour can be turned off # - 'auto git rm' behaviour can be turned off
# ------------------------------------------------------------------------------- # -------------------------------------------------------------------------------
git_add_shorcuts() { git_add_shortcuts() {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: ga <file> => git add <file>" echo "Usage: ga <file> => git add <file>"
echo " ga 1 => git add \$e1" echo " ga 1 => git add \$e1"
@@ -55,13 +55,13 @@ git_add_shorcuts() {
echo " To turn off this behaviour, change the 'auto_remove' option." echo " To turn off this behaviour, change the 'auto_remove' option."
fi fi
else else
git_silent_add_shorcuts "$@" git_silent_add_shortcuts "$@"
# Makes sense to run 'git status' after this command. # Makes sense to run 'git status' after this command.
git_status_shortcuts git_status_shortcuts
fi fi
} }
# Does nothing if no args are given. # Does nothing if no args are given.
git_silent_add_shorcuts() { git_silent_add_shortcuts() {
if [ -n "$1" ]; then if [ -n "$1" ]; then
# Expand args and process resulting set of files. # Expand args and process resulting set of files.
for file in $(git_expand_args "$@"); do for file in $(git_expand_args "$@"); do
@@ -180,7 +180,7 @@ git_commit_all() {
# Add paths or expanded args if any given, then commit all staged changes. # Add paths or expanded args if any given, then commit all staged changes.
git_add_and_commit() { git_add_and_commit() {
git_silent_add_shorcuts "$@" git_silent_add_shortcuts "$@"
changes=$(git diff --cached --numstat | wc -l) changes=$(git diff --cached --numstat | wc -l)
if [ "$changes" -gt 0 ]; then if [ "$changes" -gt 0 ]; then
git_status_shortcuts 1 # only show staged changes git_status_shortcuts 1 # only show staged changes

View File

@@ -212,13 +212,13 @@ test_git_status_shortcuts_max_changes() {
} }
test_git_add_shorcuts() { test_git_add_shortcuts() {
setupTestRepo setupTestRepo
touch a b c d e f g h i j touch a b c d e f g h i j
# Show git status, which sets up env variables # Show git status, which sets up env variables
git_status_shortcuts > /dev/null git_status_shortcuts > /dev/null
git_add_shorcuts 2..4 7 8 > /dev/null git_add_shortcuts 2..4 7 8 > /dev/null
git_status=$(git_status_shortcuts 1 | strip_colors) git_status=$(git_status_shortcuts 1 | strip_colors)
for c in b c d g h; do for c in b c d g h; do