diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-04-29 16:15:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-29 16:15:27 -0700 |
commit | bf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7 (patch) | |
tree | 41c8af11bdbfb05d0c13db0e66c3bbddb6702e93 /reset.h | |
parent | The fourth batch (diff) | |
parent | pull: pass --autostash to merge (diff) | |
download | tgif-bf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7.tar.xz |
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 'reset.h')
-rw-r--r-- | reset.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/reset.h b/reset.h new file mode 100644 index 0000000000..12f83c78e2 --- /dev/null +++ b/reset.h @@ -0,0 +1,20 @@ +#ifndef RESET_H +#define RESET_H + +#include "hash.h" +#include "repository.h" + +#define GIT_REFLOG_ACTION_ENVIRONMENT "GIT_REFLOG_ACTION" + +#define RESET_HEAD_DETACH (1<<0) +#define RESET_HEAD_HARD (1<<1) +#define RESET_HEAD_RUN_POST_CHECKOUT_HOOK (1<<2) +#define RESET_HEAD_REFS_ONLY (1<<3) +#define RESET_ORIG_HEAD (1<<4) + +int reset_head(struct repository *r, struct object_id *oid, const char *action, + const char *switch_to_branch, unsigned flags, + const char *reflog_orig_head, const char *reflog_head, + const char *default_reflog_action); + +#endif |