4949#define REBASE_FILE_MODE 0666
5050
5151typedef enum {
52- GIT_REBASE_TYPE_NONE = 0 ,
53- GIT_REBASE_TYPE_APPLY = 1 ,
54- GIT_REBASE_TYPE_MERGE = 2 ,
55- GIT_REBASE_TYPE_INTERACTIVE = 3 ,
56- } git_rebase_type_t ;
52+ GIT_REBASE_NONE = 0 ,
53+ GIT_REBASE_APPLY = 1 ,
54+ GIT_REBASE_MERGE = 2 ,
55+ GIT_REBASE_INTERACTIVE = 3 ,
56+ } git_rebase_t ;
5757
5858struct git_rebase {
5959 git_repository * repo ;
6060
6161 git_rebase_options options ;
6262
63- git_rebase_type_t type ;
63+ git_rebase_t type ;
6464 char * state_path ;
6565
6666 int head_detached : 1 ,
@@ -86,18 +86,18 @@ struct git_rebase {
8686#define GIT_REBASE_STATE_INIT {0}
8787
8888static int rebase_state_type (
89- git_rebase_type_t * type_out ,
89+ git_rebase_t * type_out ,
9090 char * * path_out ,
9191 git_repository * repo )
9292{
9393 git_buf path = GIT_BUF_INIT ;
94- git_rebase_type_t type = GIT_REBASE_TYPE_NONE ;
94+ git_rebase_t type = GIT_REBASE_NONE ;
9595
9696 if (git_buf_joinpath (& path , repo -> gitdir , REBASE_APPLY_DIR ) < 0 )
9797 return -1 ;
9898
9999 if (git_path_isdir (git_buf_cstr (& path ))) {
100- type = GIT_REBASE_TYPE_APPLY ;
100+ type = GIT_REBASE_APPLY ;
101101 goto done ;
102102 }
103103
@@ -106,14 +106,14 @@ static int rebase_state_type(
106106 return -1 ;
107107
108108 if (git_path_isdir (git_buf_cstr (& path ))) {
109- type = GIT_REBASE_TYPE_MERGE ;
109+ type = GIT_REBASE_MERGE ;
110110 goto done ;
111111 }
112112
113113done :
114114 * type_out = type ;
115115
116- if (type != GIT_REBASE_TYPE_NONE && path_out )
116+ if (type != GIT_REBASE_NONE && path_out )
117117 * path_out = git_buf_detach (& path );
118118
119119 git_buf_dispose (& path );
@@ -314,7 +314,7 @@ int git_rebase_open(
314314 if ((error = rebase_state_type (& rebase -> type , & rebase -> state_path , repo )) < 0 )
315315 goto done ;
316316
317- if (rebase -> type == GIT_REBASE_TYPE_NONE ) {
317+ if (rebase -> type == GIT_REBASE_NONE ) {
318318 git_error_set (GIT_ERROR_REBASE , "there is no rebase in progress" );
319319 error = GIT_ENOTFOUND ;
320320 goto done ;
@@ -370,14 +370,14 @@ int git_rebase_open(
370370 rebase -> orig_head_name = git_buf_detach (& orig_head_name );
371371
372372 switch (rebase -> type ) {
373- case GIT_REBASE_TYPE_INTERACTIVE :
373+ case GIT_REBASE_INTERACTIVE :
374374 git_error_set (GIT_ERROR_REBASE , "interactive rebase is not supported" );
375375 error = -1 ;
376376 break ;
377- case GIT_REBASE_TYPE_MERGE :
377+ case GIT_REBASE_MERGE :
378378 error = rebase_open_merge (rebase );
379379 break ;
380- case GIT_REBASE_TYPE_APPLY :
380+ case GIT_REBASE_APPLY :
381381 git_error_set (GIT_ERROR_REBASE , "patch application rebase is not supported" );
382382 error = -1 ;
383383 break ;
@@ -509,12 +509,12 @@ int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
509509static int rebase_ensure_not_in_progress (git_repository * repo )
510510{
511511 int error ;
512- git_rebase_type_t type ;
512+ git_rebase_t type ;
513513
514514 if ((error = rebase_state_type (& type , NULL , repo )) < 0 )
515515 return error ;
516516
517- if (type != GIT_REBASE_TYPE_NONE ) {
517+ if (type != GIT_REBASE_NONE ) {
518518 git_error_set (GIT_ERROR_REBASE , "there is an existing rebase in progress" );
519519 return -1 ;
520520 }
@@ -729,7 +729,7 @@ int git_rebase_init(
729729
730730 rebase -> repo = repo ;
731731 rebase -> inmemory = inmemory ;
732- rebase -> type = GIT_REBASE_TYPE_MERGE ;
732+ rebase -> type = GIT_REBASE_MERGE ;
733733
734734 if ((error = rebase_init_operations (rebase , repo , branch , upstream , onto )) < 0 )
735735 goto done ;
@@ -764,7 +764,7 @@ static void normalize_checkout_options_for_apply(
764764 if (!checkout_opts -> ancestor_label )
765765 checkout_opts -> ancestor_label = "ancestor" ;
766766
767- if (rebase -> type == GIT_REBASE_TYPE_MERGE ) {
767+ if (rebase -> type == GIT_REBASE_MERGE ) {
768768 if (!checkout_opts -> our_label )
769769 checkout_opts -> our_label = rebase -> onto_name ;
770770
@@ -917,7 +917,7 @@ int git_rebase_next(
917917
918918 if (rebase -> inmemory )
919919 error = rebase_next_inmemory (out , rebase );
920- else if (rebase -> type == GIT_REBASE_TYPE_MERGE )
920+ else if (rebase -> type == GIT_REBASE_MERGE )
921921 error = rebase_next_merge (out , rebase );
922922 else
923923 abort ();
@@ -1128,7 +1128,7 @@ int git_rebase_commit(
11281128 if (rebase -> inmemory )
11291129 error = rebase_commit_inmemory (
11301130 id , rebase , author , committer , message_encoding , message );
1131- else if (rebase -> type == GIT_REBASE_TYPE_MERGE )
1131+ else if (rebase -> type == GIT_REBASE_MERGE )
11321132 error = rebase_commit_merge (
11331133 id , rebase , author , committer , message_encoding , message );
11341134 else
0 commit comments