aboutsummaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index fa943d7d64..e4fda6b4bb 100644
--- a/refs.c
+++ b/refs.c
@@ -1569,7 +1569,11 @@ struct ref_iterator *refs_ref_iterator_begin(
if (!len)
continue;
- strvec_push(&normalized_exclude_patterns, pattern);
+ if (pattern[len - 1] == '/')
+ strvec_push(&normalized_exclude_patterns, pattern);
+ else
+ strvec_pushf(&normalized_exclude_patterns, "%s/",
+ pattern);
}
exclude_patterns = normalized_exclude_patterns.v;