diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:29:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:29:41 -0700 |
commit | fa4bf9edb9300da2688da8a920c506376a14de0a (patch) | |
tree | 0a2aca289c7dcc2d1f12c57fb1a925c12db46506 /git-rebase.sh | |
parent | 85318f521f6c0b9843d6da12abf67f2de7608431 (diff) | |
parent | 20351bb06bf4d32ef3d1a6849d01636f6593339f (diff) | |
download | git-fa4bf9edb9300da2688da8a920c506376a14de0a.tar.gz |
Merge branch 'rr/rebase-stash-store'
Finishing touches for the "git rebase --autostash" feature
introduced earlier.
* rr/rebase-stash-store:
rebase: use 'git stash store' to simplify logic
stash: introduce 'git stash store'
stash: simplify option parser for create
stash doc: document short form -p in synopsis
stash doc: add a warning about using create
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 54015e3eaf..81b0346a5d 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -155,11 +155,8 @@ finish_rebase () { then echo "$(gettext 'Applied autostash.')" else - ref_stash=refs/stash && - >>"$GIT_DIR/logs/$ref_stash" && - git update-ref -m "autostash" $ref_stash $stash_sha1 || - die "$(eval_gettext 'Cannot store $stash_sha1')" - + git stash store -m "autostash" -q $stash_sha1 || + die "$(eval_gettext "Cannot store \$stash_sha1")" gettext 'Applying autostash resulted in conflicts. Your changes are safe in the stash. You can run "git stash pop" or "git stash drop" it at any time. |