@@ -106,7 +106,7 @@ static int handle_line(char *line, struct merge_parents *merge_parents)
106
106
int i , len = strlen (line );
107
107
struct origin_data * origin_data ;
108
108
char * src ;
109
- const char * origin ;
109
+ const char * origin , * tag_name ;
110
110
struct src_data * src_data ;
111
111
struct string_list_item * item ;
112
112
int pulling_head = 0 ;
@@ -162,14 +162,13 @@ static int handle_line(char *line, struct merge_parents *merge_parents)
162
162
if (pulling_head ) {
163
163
origin = src ;
164
164
src_data -> head_status |= 1 ;
165
- } else if (starts_with (line , "branch " )) {
165
+ } else if (skip_prefix (line , "branch " , & origin )) {
166
166
origin_data -> is_local_branch = 1 ;
167
- origin = line + 7 ;
168
167
string_list_append (& src_data -> branch , origin );
169
168
src_data -> head_status |= 2 ;
170
- } else if (starts_with (line , "tag " )) {
169
+ } else if (skip_prefix (line , "tag " , & tag_name )) {
171
170
origin = line ;
172
- string_list_append (& src_data -> tag , origin + 4 );
171
+ string_list_append (& src_data -> tag , tag_name );
173
172
src_data -> head_status |= 2 ;
174
173
} else if (skip_prefix (line , "remote-tracking branch " , & origin )) {
175
174
string_list_append (& src_data -> r_branch , origin );
0 commit comments