@@ -985,9 +985,9 @@ static int compare_refs(const void *a_, const void *b_)
985
985
return 0 ;
986
986
}
987
987
988
- void ref_array_sort (struct ref_sorting * sort , struct ref_array * array )
988
+ void ref_array_sort (struct ref_sorting * sorting , struct ref_array * array )
989
989
{
990
- ref_sorting = sort ;
990
+ ref_sorting = sorting ;
991
991
qsort (array -> items , array -> nr , sizeof (struct ref_array_item * ), compare_refs );
992
992
}
993
993
@@ -1089,25 +1089,25 @@ struct ref_sorting *ref_default_sorting(void)
1089
1089
{
1090
1090
static const char cstr_name [] = "refname" ;
1091
1091
1092
- struct ref_sorting * sort = xcalloc (1 , sizeof (* sort ));
1092
+ struct ref_sorting * sorting = xcalloc (1 , sizeof (* sorting ));
1093
1093
1094
- sort -> next = NULL ;
1095
- sort -> atom = parse_ref_filter_atom (cstr_name , cstr_name + strlen (cstr_name ));
1096
- return sort ;
1094
+ sorting -> next = NULL ;
1095
+ sorting -> atom = parse_ref_filter_atom (cstr_name , cstr_name + strlen (cstr_name ));
1096
+ return sorting ;
1097
1097
}
1098
1098
1099
1099
int parse_opt_ref_sorting (const struct option * opt , const char * arg , int unset )
1100
1100
{
1101
- struct ref_sorting * * sort_tail = opt -> value ;
1101
+ struct ref_sorting * * sorting_tail = opt -> value ;
1102
1102
struct ref_sorting * s ;
1103
1103
int len ;
1104
1104
1105
1105
if (!arg ) /* should --no-sort void the list ? */
1106
1106
return -1 ;
1107
1107
1108
1108
s = xcalloc (1 , sizeof (* s ));
1109
- s -> next = * sort_tail ;
1110
- * sort_tail = s ;
1109
+ s -> next = * sorting_tail ;
1110
+ * sorting_tail = s ;
1111
1111
1112
1112
if (* arg == '-' ) {
1113
1113
s -> reverse = 1 ;
@@ -1127,7 +1127,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
1127
1127
{
1128
1128
int i ;
1129
1129
const char * format = "%(objectname) %(objecttype)\t%(refname)" ;
1130
- struct ref_sorting * sort = NULL , * * sort_tail = & sort ;
1130
+ struct ref_sorting * sorting = NULL , * * sorting_tail = & sorting ;
1131
1131
int maxcount = 0 , quote_style = 0 ;
1132
1132
struct ref_filter_cbdata ref_cbdata ;
1133
1133
@@ -1144,7 +1144,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
1144
1144
OPT_GROUP ("" ),
1145
1145
OPT_INTEGER ( 0 , "count" , & maxcount , N_ ("show only <n> matched refs" )),
1146
1146
OPT_STRING ( 0 , "format" , & format , N_ ("format" ), N_ ("format to use for the output" )),
1147
- OPT_CALLBACK (0 , "sort" , sort_tail , N_ ("key" ),
1147
+ OPT_CALLBACK (0 , "sort" , sorting_tail , N_ ("key" ),
1148
1148
N_ ("field name to sort on" ), & parse_opt_ref_sorting ),
1149
1149
OPT_END (),
1150
1150
};
@@ -1161,8 +1161,8 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
1161
1161
if (verify_ref_format (format ))
1162
1162
usage_with_options (for_each_ref_usage , opts );
1163
1163
1164
- if (!sort )
1165
- sort = ref_default_sorting ();
1164
+ if (!sorting )
1165
+ sorting = ref_default_sorting ();
1166
1166
1167
1167
/* for warn_ambiguous_refs */
1168
1168
git_config (git_default_config , NULL );
@@ -1171,7 +1171,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
1171
1171
ref_cbdata .filter .name_patterns = argv ;
1172
1172
for_each_rawref (ref_filter_handler , & ref_cbdata );
1173
1173
1174
- ref_array_sort (sort , & ref_cbdata .array );
1174
+ ref_array_sort (sorting , & ref_cbdata .array );
1175
1175
1176
1176
if (!maxcount || ref_cbdata .array .nr < maxcount )
1177
1177
maxcount = ref_cbdata .array .nr ;
0 commit comments