@@ -307,7 +307,6 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
307
307
int fd ;
308
308
struct string_list partial ;
309
309
struct pathspec pathspec ;
310
- char * old_index_env = NULL ;
311
310
int refresh_flags = REFRESH_QUIET ;
312
311
313
312
if (is_status )
@@ -320,6 +319,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
320
319
die (_ ("index file corrupt" ));
321
320
322
321
if (interactive ) {
322
+ char * old_index_env = NULL ;
323
323
fd = hold_locked_index (& index_lock , 1 );
324
324
325
325
refresh_cache_or_die (refresh_flags );
@@ -600,12 +600,10 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
600
600
{
601
601
struct stat statbuf ;
602
602
struct strbuf committer_ident = STRBUF_INIT ;
603
- int commitable , saved_color_setting ;
603
+ int commitable ;
604
604
struct strbuf sb = STRBUF_INIT ;
605
- char * buffer ;
606
605
const char * hook_arg1 = NULL ;
607
606
const char * hook_arg2 = NULL ;
608
- int ident_shown = 0 ;
609
607
int clean_message_contents = (cleanup_mode != CLEANUP_NONE );
610
608
int old_display_comment_prefix ;
611
609
@@ -649,6 +647,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
649
647
logfile );
650
648
hook_arg1 = "message" ;
651
649
} else if (use_message ) {
650
+ char * buffer ;
652
651
buffer = strstr (use_message_buffer , "\n\n" );
653
652
if (!use_editor && (!buffer || buffer [2 ] == '\0' ))
654
653
die (_ ("commit has empty message" ));
@@ -753,6 +752,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
753
752
/* This checks if committer ident is explicitly given */
754
753
strbuf_addstr (& committer_ident , git_committer_info (IDENT_STRICT ));
755
754
if (use_editor && include_status ) {
755
+ int ident_shown = 0 ;
756
+ int saved_color_setting ;
756
757
char * ai_tmp , * ci_tmp ;
757
758
if (whence != FROM_COMMIT )
758
759
status_printf_ln (s , GIT_COLOR_NORMAL ,
@@ -1510,7 +1511,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1510
1511
struct ref_lock * ref_lock ;
1511
1512
struct commit_list * parents = NULL , * * pptr = & parents ;
1512
1513
struct stat statbuf ;
1513
- int allow_fast_forward = 1 ;
1514
1514
struct commit * current_head = NULL ;
1515
1515
struct commit_extra_header * extra = NULL ;
1516
1516
@@ -1558,6 +1558,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1558
1558
} else if (whence == FROM_MERGE ) {
1559
1559
struct strbuf m = STRBUF_INIT ;
1560
1560
FILE * fp ;
1561
+ int allow_fast_forward = 1 ;
1561
1562
1562
1563
if (!reflog_msg )
1563
1564
reflog_msg = "commit (merge)" ;
0 commit comments