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:
authorJoel Teichroeb <joel@teichroeb.net>2019-02-26 02:16:17 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-07 03:41:40 +0300
commit577c1995e8c8cb414a6beb430f220e1ded216a64 (patch)
tree9a6ec1ea37b80482f7c02e066f665233dab9b649 /git-stash.sh
parent4e2dd393031bba5abf32f1df6aff107903cabcfd (diff)
stash: convert branch to builtin
Add stash branch to the helper and delete the apply_to_branch function from the shell script. Checkout does not currently provide a function for checking out a branch as cmd_checkout does a large amount of sanity checks first that we require here. Signed-off-by: Joel Teichroeb <joel@teichroeb.net> 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.sh17
1 files changed, 2 insertions, 15 deletions
diff --git a/git-stash.sh b/git-stash.sh
index b8f70230f9..67db321a4c 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -615,20 +615,6 @@ drop_stash () {
clear_stash
}
-apply_to_branch () {
- test -n "$1" || die "$(gettext "No branch name specified")"
- branch=$1
- shift 1
-
- set -- --index "$@"
- assert_stash_like "$@"
-
- git checkout -b $branch $REV^ &&
- apply_stash "$@" && {
- test -z "$IS_STASH_REF" || drop_stash "$@"
- }
-}
-
test "$1" = "-p" && set "push" "$@"
PARSE_CACHE='--not-parsed'
@@ -690,7 +676,8 @@ pop)
;;
branch)
shift
- apply_to_branch "$@"
+ cd "$START_DIR"
+ git stash--helper branch "$@"
;;
*)
case $# in