@@ -3199,37 +3199,37 @@ static int do_filter_refs(struct ref_filter *filter, unsigned int type, each_ref
3199
3199
/* Simple per-ref filtering */
3200
3200
if (!filter -> kind )
3201
3201
die ("filter_refs: invalid type" );
3202
- else {
3203
- /*
3204
- * For common cases where we need only branches or remotes or tags,
3205
- * we only iterate through those refs. If a mix of refs is needed,
3206
- * we iterate over all refs and filter out required refs with the help
3207
- * of filter_ref_kind().
3208
- */
3209
- if (filter -> kind == FILTER_REFS_BRANCHES )
3210
- ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3211
- "refs/heads/" , NULL ,
3212
- fn , cb_data );
3213
- else if (filter -> kind == FILTER_REFS_REMOTES )
3214
- ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3215
- "refs/remotes/" , NULL ,
3216
- fn , cb_data );
3217
- else if (filter -> kind == FILTER_REFS_TAGS )
3218
- ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3219
- "refs/tags/" , NULL , fn ,
3220
- cb_data );
3221
- else if (filter -> kind & FILTER_REFS_REGULAR )
3222
- ret = for_each_fullref_in_pattern (filter , fn , cb_data );
3223
3202
3224
- /*
3225
- * When printing all ref types, HEAD is already included,
3226
- * so we don't want to print HEAD again.
3227
- */
3228
- if (!ret && !(filter -> kind & FILTER_REFS_ROOT_REFS ) &&
3229
- (filter -> kind & FILTER_REFS_DETACHED_HEAD ))
3230
- refs_head_ref (get_main_ref_store (the_repository ), fn ,
3231
- cb_data );
3232
- }
3203
+ /*
3204
+ * For common cases where we need only branches or remotes or tags,
3205
+ * we only iterate through those refs. If a mix of refs is needed,
3206
+ * we iterate over all refs and filter out required refs with the help
3207
+ * of filter_ref_kind().
3208
+ */
3209
+ if (filter -> kind == FILTER_REFS_BRANCHES )
3210
+ ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3211
+ "refs/heads/" , NULL ,
3212
+ fn , cb_data );
3213
+ else if (filter -> kind == FILTER_REFS_REMOTES )
3214
+ ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3215
+ "refs/remotes/" , NULL ,
3216
+ fn , cb_data );
3217
+ else if (filter -> kind == FILTER_REFS_TAGS )
3218
+ ret = refs_for_each_fullref_in (get_main_ref_store (the_repository ),
3219
+ "refs/tags/" , NULL , fn ,
3220
+ cb_data );
3221
+ else if (filter -> kind & FILTER_REFS_REGULAR )
3222
+ ret = for_each_fullref_in_pattern (filter , fn , cb_data );
3223
+
3224
+ /*
3225
+ * When printing all ref types, HEAD is already included,
3226
+ * so we don't want to print HEAD again.
3227
+ */
3228
+ if (!ret && !(filter -> kind & FILTER_REFS_ROOT_REFS ) &&
3229
+ (filter -> kind & FILTER_REFS_DETACHED_HEAD ))
3230
+ refs_head_ref (get_main_ref_store (the_repository ), fn ,
3231
+ cb_data );
3232
+
3233
3233
3234
3234
clear_contains_cache (& filter -> internal .contains_cache );
3235
3235
clear_contains_cache (& filter -> internal .no_contains_cache );
0 commit comments