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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <peff@xxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]