summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-27 14:29:41 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-27 14:29:41 -0700
commitfa4bf9edb9300da2688da8a920c506376a14de0a (patch)
tree0a2aca289c7dcc2d1f12c57fb1a925c12db46506 /git-rebase.sh
parent85318f521f6c0b9843d6da12abf67f2de7608431 (diff)
parent20351bb06bf4d32ef3d1a6849d01636f6593339f (diff)
downloadgit-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-xgit-rebase.sh7
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.