Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>2019-02-26 02:16:21 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-07 03:41:40 +0300
commit41e0dd55c4300dc83ea2883bf04bfb234c071f98 (patch)
treef2b3a1486524efe6c61b0998d0c4a8b7e112875b /git-stash.sh
parentdc7bd382b1063303f4f45d243bff371899285acb (diff)
stash: convert store to builtin
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh43
1 files changed, 2 insertions, 41 deletions
diff --git a/git-stash.sh b/git-stash.sh
index d0318f859e..ff5556ccb0 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -208,45 +208,6 @@ create_stash () {
die "$(gettext "Cannot record working tree state")"
}
-store_stash () {
- while test $# != 0
- do
- case "$1" in
- -m|--message)
- shift
- stash_msg="$1"
- ;;
- -m*)
- stash_msg=${1#-m}
- ;;
- --message=*)
- stash_msg=${1#--message=}
- ;;
- -q|--quiet)
- quiet=t
- ;;
- *)
- break
- ;;
- esac
- shift
- done
- test $# = 1 ||
- die "$(eval_gettext "\"$dashless store\" requires one <commit> argument")"
-
- w_commit="$1"
- if test -z "$stash_msg"
- then
- stash_msg="Created via \"git stash store\"."
- fi
-
- git update-ref --create-reflog -m "$stash_msg" $ref_stash $w_commit
- ret=$?
- test $ret != 0 && test -z "$quiet" &&
- die "$(eval_gettext "Cannot update \$ref_stash with \$w_commit")"
- return $ret
-}
-
push_stash () {
keep_index=
patch_mode=
@@ -325,7 +286,7 @@ push_stash () {
clear_stash || die "$(gettext "Cannot initialize stash")"
create_stash -m "$stash_msg" -u "$untracked" -- "$@"
- store_stash -m "$stash_msg" -q $w_commit ||
+ git stash--helper store -m "$stash_msg" -q $w_commit ||
die "$(gettext "Cannot save the current status")"
say "$(eval_gettext "Saved working directory and index state \$stash_msg")"
@@ -485,7 +446,7 @@ create)
;;
store)
shift
- store_stash "$@"
+ git stash--helper store "$@"
;;
drop)
shift