rebase (autostash): store the full OID in <state-dir>/autostash
authorJohannes Schindelin <redacted>
Mon, 22 Oct 2018 22:15:03 +0000 (15:15 -0700)
committerJunio C Hamano <redacted>
Tue, 23 Oct 2018 04:17:08 +0000 (13:17 +0900)
commit12aeb00a22e589f85e26da833e05bb1a7e412d07
tree328214da4651d140957cca8673c432a3088569dd
parent71064e6008d13de72de0387a1301a557477cbed2
rebase (autostash): store the full OID in <state-dir>/autostash

It was reported by Gábor Szeder and analyzed by Alban Gruin that the
built-in rebase stores only abbreviated stash hashes in the `autostash`
file.

This is problematic e.g. in t5520-pull.sh, where the abbreviated hash is
so short that it sometimes consists only of digits, which are
subsequently mistaken ("DWIMmed") for numbers by `git stash apply`.

Let's align the behavior of the built-in rebase with the scripted rebase
and store the full stash hash instead. That makes it a lot less likely
that it consists only of digits.

Signed-off-by: Johannes Schindelin <redacted>
Reviewed-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/rebase.c
git clone https://git.99rst.org/PROJECT