diff options
author | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2009-02-16 18:20:25 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-04 00:56:52 -0800 |
commit | aec0c1bbfb2d42659bb710bd79f8228ac59e1b0c (patch) | |
tree | d82e30e8fc402b91c958be030f54f38736f6d5bb /t | |
parent | Improve error message for git-filter-branch (diff) | |
download | tgif-aec0c1bbfb2d42659bb710bd79f8228ac59e1b0c.tar.xz |
git-archive: add --output=<file> to send output to a file
When archiving a repository there is no way to specify a file as output.
This patch adds a new option "--output" that redirects the output to a
file instead of stdout.
Signed-off-by: Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5000-tar-tree.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index c942c8be85..b7e362834b 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -86,6 +86,10 @@ test_expect_success \ 'git archive vs. the same in a bare repo' \ 'test_cmp b.tar b3.tar' +test_expect_success 'git archive with --output' \ + 'git archive --output=b4.tar HEAD && + test_cmp b.tar b4.tar' + test_expect_success \ 'validate file modification time' \ 'mkdir extract && @@ -172,6 +176,10 @@ test_expect_success \ 'git archive --format=zip vs. the same in a bare repo' \ 'test_cmp d.zip d1.zip' +test_expect_success 'git archive --format=zip with --output' \ + 'git archive --format=zip --output=d2.zip HEAD && + test_cmp d.zip d2.zip' + $UNZIP -v >/dev/null 2>&1 if [ $? -eq 127 ]; then echo "Skipping ZIP tests, because unzip was not found" |