diff options
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/git-stash.sh b/git-stash.sh index c7c65e25f5..90d63f293e 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -15,7 +15,6 @@ SUBDIRECTORY_OK=Yes OPTIONS_SPEC= START_DIR=$(pwd) . git-sh-setup -. git-sh-i18n require_work_tree cd_to_toplevel @@ -101,7 +100,7 @@ create_stash () { u_tree=$(git write-tree) && printf 'untracked files on %s\n' "$msg" | git commit-tree $u_tree && rm -f "$TMPindex" - ) ) || die "Cannot save the untracked files" + ) ) || die "$(gettext "Cannot save the untracked files")" untracked_commit_option="-p $u_commit"; else @@ -185,7 +184,7 @@ store_stash () { git update-ref --create-reflog -m "$stash_msg" $ref_stash $w_commit ret=$? - test $ret != 0 && test -z $quiet && + test $ret != 0 && test -z "$quiet" && die "$(eval_gettext "Cannot update \$ref_stash with \$w_commit")" return $ret } @@ -249,7 +248,7 @@ save_stash () { if test -n "$patch_mode" && test -n "$untracked" then - die "Can't use --patch and --include-untracked or --all at the same time" + die "$(gettext "Can't use --patch and --include-untracked or --all at the same time")" fi stash_msg="$*" @@ -266,7 +265,7 @@ save_stash () { create_stash "$stash_msg" $untracked store_stash -m "$stash_msg" -q $w_commit || die "$(gettext "Cannot save the current status")" - say Saved working directory and index state "$stash_msg" + say "$(eval_gettext "Saved working directory and index state \$stash_msg")" if test -z "$patch_mode" then @@ -277,7 +276,7 @@ save_stash () { git clean --force --quiet -d $CLEAN_X_OPTION fi - if test "$keep_index" = "t" && test -n $i_tree + if test "$keep_index" = "t" && test -n "$i_tree" then git read-tree --reset -u $i_tree fi @@ -495,7 +494,7 @@ apply_stash () { GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" && GIT_INDEX_FILE="$TMPindex" git checkout-index --all && rm -f "$TMPindex" || - die 'Could not restore untracked files from stash' + die "$(gettext "Could not restore untracked files from stash")" fi eval " @@ -549,7 +548,7 @@ pop_stash() { drop_stash "$@" else status=$? - say "The stash is kept in case you need it again." + say "$(gettext "The stash is kept in case you need it again.")" exit $status fi } |