summaryrefslogtreecommitdiffstats
path: root/sequencer.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-01-19 11:40:15 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-19 20:10:41 +0100
commit35122daebc8030ccc42f54fe4f08272091e4aa94 (patch)
tree6650df01b6ecc547f3257c84404745388a8c4735 /sequencer.h
parentrefs: convert AUTO_MERGE to become a normal pseudo-ref (diff)
downloadgit-35122daebc8030ccc42f54fe4f08272091e4aa94.tar.xz
git-35122daebc8030ccc42f54fe4f08272091e4aa94.zip
sequencer: introduce functions to handle autostashes via refs
We're about to convert the MERGE_AUTOSTASH ref to become non-special, using the refs API instead of direct filesystem access to both read and write the ref. The current interfaces to write autostashes is entirely path-based though, so we need to extend them to also support writes via the refs API instead. Ideally, we would be able to fully replace the old set of path-based interfaces. But the sequencer will continue to write state into "rebase-merge/autostash". This path is not considered to be a ref at all and will thus stay is-is for now, which requires us to keep both path- and refs-based interfaces to handle autostashes. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 913a0f652d..dcef7bb99c 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -225,9 +225,12 @@ void commit_post_rewrite(struct repository *r,
const struct object_id *new_head);
void create_autostash(struct repository *r, const char *path);
+void create_autostash_ref(struct repository *r, const char *refname);
int save_autostash(const char *path);
+int save_autostash_ref(struct repository *r, const char *refname);
int apply_autostash(const char *path);
int apply_autostash_oid(const char *stash_oid);
+int apply_autostash_ref(struct repository *r, const char *refname);
#define SUMMARY_INITIAL_COMMIT (1 << 0)
#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)