Thread (21 messages) flat view 21 messages, 6 authors, 2016-06-15
STALE3730d

[PATCH 4/7] archive: advertise user tar-filters in --list

From: Jeff King <hidden>
Date: 2016-06-15 22:51:29
Subsystem: the rest · Maintainer: Linus Torvalds

These can be selected by --format, so we need to let users
know about them. It is especially important for the remote
case, since this is the only method by which users can find
out which formats the remote has configured.

Signed-off-by: Jeff King <redacted>
---
 archive.c           |    3 +++
 t/t5000-tar-tree.sh |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/archive.c b/archive.c
index cf58faa..a987936 100644
--- a/archive.c
+++ b/archive.c
@@ -358,8 +358,11 @@ static int parse_archive_args(int argc, const char **argv,
 		base = "";
 
 	if (list) {
+		struct tar_filter *p;
 		for (i = 0; i < ARRAY_SIZE(archivers); i++)
 			printf("%s\n", archivers[i].name);
+		for (p = tar_filters; p; p = p->next)
+			printf("%s\n", p->name);
 		exit(0);
 	}
 
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 2b2b128..9f959b1 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -267,12 +267,12 @@ test_expect_success 'filters can allow compression levels' '
 	test_cmp expect output
 '
 
-test_expect_failure 'archive --list mentions user filter' '
+test_expect_success 'archive --list mentions user filter' '
 	git archive --list >output &&
 	grep "^fake\$" output
 '
 
-test_expect_failure 'archive --list shows remote user filters' '
+test_expect_success 'archive --list shows remote user filters' '
 	git archive --list --remote=. >output &&
 	grep "^fake\$" output
 '
-- 
1.7.6.rc1.4.g49204
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help