reftable: refactor auto-stashes to read refs via the refdb
Auto-stashes are used by various commands like git-merge(1) or git-rebase(1) to stash changes to the working directory before performing the actual command's logic. These auto-stashes are recorded via a special reference that is specific to the command in question:
MERGE_AUTOSTASH
rebase-merge/autostash
rebase-apply/autostash
- Others?
These files look like a loose reference, but often don't go through the refdb. We should refactor the code to consistently go through the refdb.
Edited by Patrick Steinhardt