diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-01-26 16:05:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-26 23:08:53 +0300 |
commit | b7de153bd9332a992baa6f937372f0b1833f61e5 (patch) | |
tree | 6e240d23a6a0d2a85262d9588f52994276f3c241 /sequencer.c | |
parent | 1526d0fcfd20efca24bc96a4bc14c8d5459ec470 (diff) |
create_autostash(): remove unneeded parameter
The default_reflog parameter of create_autostash() is passed to
reset_head(). However as creating a stash does not involve updating
any refs the parameter is not used by reset_head(). Removing the
parameter from create_autostash() simplifies the callers.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index e18329a399..119564f435 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4100,8 +4100,7 @@ static enum todo_command peek_command(struct todo_list *todo_list, int offset) return -1; } -void create_autostash(struct repository *r, const char *path, - const char *default_reflog_action) +void create_autostash(struct repository *r, const char *path) { struct strbuf buf = STRBUF_INIT; struct lock_file lock_file = LOCK_INIT; @@ -4138,7 +4137,7 @@ void create_autostash(struct repository *r, const char *path, write_file(path, "%s", oid_to_hex(&oid)); printf(_("Created autostash: %s\n"), buf.buf); if (reset_head(r, NULL, NULL, RESET_HEAD_HARD, NULL, NULL, - default_reflog_action) < 0) + NULL) < 0) die(_("could not reset --hard")); if (discard_index(r->index) < 0 || |