summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-04-07 14:27:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-10 16:28:02 (GMT)
commit86ed00aff4b86eed6ecc606e9d5f7828a1dca353 (patch)
tree25ffee60f467f9e4b343f21e09b2f2db2795526c /sequencer.h
parentfacca7f06e7256bf15675657f59ef6f6c883aec3 (diff)
downloadgit-86ed00aff4b86eed6ecc606e9d5f7828a1dca353.zip
git-86ed00aff4b86eed6ecc606e9d5f7828a1dca353.tar.gz
git-86ed00aff4b86eed6ecc606e9d5f7828a1dca353.tar.bz2
rebase: use apply_autostash() from sequencer.c
The apply_autostash() function in builtin/rebase.c is similar enough to the apply_autostash() function in sequencer.c that they are almost interchangeable, except for the type of arg they accept. Make the sequencer.c version extern and use it in rebase. The rebase version was introduced in 6defce2b02 (builtin rebase: support `--autostash` option, 2018-09-04) as part of the shell to C conversion. It opted to duplicate the function because, at the time, there was another in-progress project converting interactive rebase from shell to C as well and they did not want to clash with them by refactoring sequencer.c version of apply_autostash(). Since both efforts are long done, we can freely combine them together now. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index ab43717..ab68614 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -191,6 +191,8 @@ void commit_post_rewrite(struct repository *r,
const struct commit *current_head,
const struct object_id *new_head);
+int apply_autostash(const char *path);
+
#define SUMMARY_INITIAL_COMMIT (1 << 0)
#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
void print_commit_summary(struct repository *repo,