@@ -1744,7 +1744,7 @@ static const char skip_first_commit_msg_str[] = N_("The 1st commit message will
1744
1744
static const char skip_nth_commit_msg_fmt [] = N_ ("The commit message #%d will be skipped:" );
1745
1745
static const char combined_commit_msg_fmt [] = N_ ("This is a combination of %d commits." );
1746
1746
1747
- static int check_fixup_flag (enum todo_command command , unsigned flag )
1747
+ static int is_fixup_flag (enum todo_command command , unsigned flag )
1748
1748
{
1749
1749
return command == TODO_FIXUP && ((flag & TODO_REPLACE_FIXUP_MSG ) ||
1750
1750
(flag & TODO_EDIT_FIXUP_MSG ));
@@ -1873,7 +1873,7 @@ static int append_squash_message(struct strbuf *buf, const char *body,
1873
1873
strbuf_addstr (buf , body + commented_len );
1874
1874
1875
1875
/* fixup -C after squash behaves like squash */
1876
- if (check_fixup_flag (command , flag ) && !seen_squash (opts )) {
1876
+ if (is_fixup_flag (command , flag ) && !seen_squash (opts )) {
1877
1877
/*
1878
1878
* We're replacing the commit message so we need to
1879
1879
* append the Signed-off-by: trailer if the user
@@ -1928,7 +1928,7 @@ static int update_squash_messages(struct repository *r,
1928
1928
opts -> current_fixup_count + 2 );
1929
1929
strbuf_splice (& buf , 0 , eol - buf .buf , header .buf , header .len );
1930
1930
strbuf_release (& header );
1931
- if (check_fixup_flag (command , flag ) && !seen_squash (opts ))
1931
+ if (is_fixup_flag (command , flag ) && !seen_squash (opts ))
1932
1932
update_squash_message_for_fixup (& buf );
1933
1933
} else {
1934
1934
struct object_id head ;
@@ -1951,11 +1951,11 @@ static int update_squash_messages(struct repository *r,
1951
1951
strbuf_addf (& buf , "%c " , comment_line_char );
1952
1952
strbuf_addf (& buf , _ (combined_commit_msg_fmt ), 2 );
1953
1953
strbuf_addf (& buf , "\n%c " , comment_line_char );
1954
- strbuf_addstr (& buf , check_fixup_flag (command , flag ) ?
1954
+ strbuf_addstr (& buf , is_fixup_flag (command , flag ) ?
1955
1955
_ (skip_first_commit_msg_str ) :
1956
1956
_ (first_commit_msg_str ));
1957
1957
strbuf_addstr (& buf , "\n\n" );
1958
- if (check_fixup_flag (command , flag ))
1958
+ if (is_fixup_flag (command , flag ))
1959
1959
strbuf_add_commented_lines (& buf , body , strlen (body ));
1960
1960
else
1961
1961
strbuf_addstr (& buf , body );
@@ -1968,7 +1968,7 @@ static int update_squash_messages(struct repository *r,
1968
1968
oid_to_hex (& commit -> object .oid ));
1969
1969
find_commit_subject (message , & body );
1970
1970
1971
- if (command == TODO_SQUASH || check_fixup_flag (command , flag )) {
1971
+ if (command == TODO_SQUASH || is_fixup_flag (command , flag )) {
1972
1972
res = append_squash_message (& buf , body , command , opts , flag );
1973
1973
} else if (command == TODO_FIXUP ) {
1974
1974
strbuf_addf (& buf , "\n%c " , comment_line_char );
@@ -5661,7 +5661,7 @@ static int subject2item_cmp(const void *fndata,
5661
5661
5662
5662
define_commit_slab (commit_todo_item , struct todo_item * );
5663
5663
5664
- static inline int skip_fixup_amend_squash (const char * subject , const char * * p ) {
5664
+ static int skip_fixupish (const char * subject , const char * * p ) {
5665
5665
return skip_prefix (subject , "fixup! " , p ) ||
5666
5666
skip_prefix (subject , "amend! " , p ) ||
5667
5667
skip_prefix (subject , "squash! " , p );
@@ -5725,13 +5725,13 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
5725
5725
format_subject (& buf , subject , " " );
5726
5726
subject = subjects [i ] = strbuf_detach (& buf , & subject_len );
5727
5727
unuse_commit_buffer (item -> commit , commit_buffer );
5728
- if (skip_fixup_amend_squash (subject , & p )) {
5728
+ if (skip_fixupish (subject , & p )) {
5729
5729
struct commit * commit2 ;
5730
5730
5731
5731
for (;;) {
5732
5732
while (isspace (* p ))
5733
5733
p ++ ;
5734
- if (!skip_fixup_amend_squash (p , & p ))
5734
+ if (!skip_fixupish (p , & p ))
5735
5735
break ;
5736
5736
}
5737
5737
0 commit comments