sequencer: fixup the datatype of the 'flag' argument
As 'flag' is a combination of bits, so change its datatype from 'enum todo_item_flags' to 'unsigned'. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Charvi Mendiratta committed
Feb 9, 2021 at 00:55 UTC
a25314c1ec4c16a14c4d444e0bdb3f30ce0a9620
1 file changed
+3
-4
sequencer.c
+3
-4
@@ -1744,8 +1744,7 @@ static const char skip_first_commit_msg_str[] = N_("The 1st commit message will
1744
static const char skip_nth_commit_msg_fmt[] = N_("The commit message #%d will be skipped:");
1745
static const char combined_commit_msg_fmt[] = N_("This is a combination of %d commits.");
1746
1747
-static int check_fixup_flag(enum todo_command command,
1748
- enum todo_item_flags flag)
1747
+static int check_fixup_flag(enum todo_command command, unsigned flag)
1748
{
1749
return command == TODO_FIXUP && ((flag & TODO_REPLACE_FIXUP_MSG) ||
1750
(flag & TODO_EDIT_FIXUP_MSG));
@@ -1850,7 +1849,7 @@ static void update_squash_message_for_fixup(struct strbuf *msg)
1849
1850
static int append_squash_message(struct strbuf *buf, const char *body,
1851
enum todo_command command, struct replay_opts *opts,
1853
- enum todo_item_flags flag)
1852
+ unsigned flag)
1853
{
1854
const char *fixup_msg;
1855
size_t commented_len = 0, fixup_off;
@@ -1906,7 +1905,7 @@ static int update_squash_messages(struct repository *r,
1905
enum todo_command command,
1906
struct commit *commit,
1907
struct replay_opts *opts,
1909
- enum todo_item_flags flag)
1908
+ unsigned flag)
1909
{
1910
struct strbuf buf = STRBUF_INIT;
1911
int res = 0;