rebase: use 'git stash store' to simplify logic

rebase has no reason to know about the implementation of the stash. In the case when applying the autostash results in conflicts, replace the relevant code in finish_rebase () to simply call 'git stash store'. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramkumar Ramachandra committed Jun 15, 2013 at 18:43 UTC 20351bb06bf4d32ef3d1a6849d01636f6593339f
1 file changed +2 -5
git-rebase.sh
+2 -5
@@ -153,11 +153,8 @@ finish_rebase () {
153 then
154 echo "$(gettext 'Applied autostash.')"
155 else
156 - ref_stash=refs/stash &&
157 - >>"$GIT_DIR/logs/$ref_stash" &&
158 - git update-ref -m "autostash" $ref_stash $stash_sha1 ||
159 - die "$(eval_gettext 'Cannot store $stash_sha1')"
160 -
156 + git stash store -m "autostash" -q $stash_sha1 ||
157 + die "$(eval_gettext "Cannot store \$stash_sha1")"
158 gettext 'Applying autostash resulted in conflicts.
159 Your changes are safe in the stash.
160 You can run "git stash pop" or "git stash drop" it at any time.