summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-29 23:15:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-29 23:15:27 (GMT)
commitbf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7 (patch)
tree41c8af11bdbfb05d0c13db0e66c3bbddb6702e93 /sequencer.h
parent86ab15cb154862b6fa5cc646dac27532f881e1fb (diff)
parentd9f15d37f1a545305988f6b2bb40de1fbf0049cf (diff)
downloadgit-bf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7.zip
git-bf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7.tar.gz
git-bf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7.tar.bz2
Merge branch 'dl/merge-autostash'
"git merge" learns the "--autostash" option. * dl/merge-autostash: (22 commits) pull: pass --autostash to merge t5520: make test_pull_autostash() accept expect_parent_num merge: teach --autostash option sequencer: implement apply_autostash_oid() sequencer: implement save_autostash() sequencer: unlink autostash in apply_autostash() sequencer: extract perform_autostash() from rebase rebase: generify create_autostash() rebase: extract create_autostash() reset: extract reset_head() from rebase rebase: generify reset_head() rebase: use apply_autostash() from sequencer.c sequencer: rename stash_sha1 to stash_oid sequencer: make apply_autostash() accept a path rebase: use read_oneliner() sequencer: make read_oneliner() extern sequencer: configurably warn on non-existent files sequencer: make read_oneliner() accept flags sequencer: make file exists check more efficient sequencer: stop leaking buf ...
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index 9611605..d31c41f 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -191,6 +191,12 @@ void commit_post_rewrite(struct repository *r,
const struct commit *current_head,
const struct object_id *new_head);
+void create_autostash(struct repository *r, const char *path,
+ const char *default_reflog_action);
+int save_autostash(const char *path);
+int apply_autostash(const char *path);
+int apply_autostash_oid(const char *stash_oid);
+
#define SUMMARY_INITIAL_COMMIT (1 << 0)
#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
void print_commit_summary(struct repository *repo,
@@ -198,6 +204,20 @@ void print_commit_summary(struct repository *repo,
const struct object_id *oid,
unsigned int flags);
+#define READ_ONELINER_SKIP_IF_EMPTY (1 << 0)
+#define READ_ONELINER_WARN_MISSING (1 << 1)
+
+/*
+ * Reads a file that was presumably written by a shell script, i.e. with an
+ * end-of-line marker that needs to be stripped.
+ *
+ * Note that only the last end-of-line marker is stripped, consistent with the
+ * behavior of "$(cat path)" in a shell script.
+ *
+ * Returns 1 if the file was read, 0 if it could not be read or does not exist.
+ */
+int read_oneliner(struct strbuf *buf,
+ const char *path, unsigned flags);
int read_author_script(const char *path, char **name, char **email, char **date,
int allow_missing);
void parse_strategy_opts(struct replay_opts *opts, char *raw_opts);