From: Junio C Hamano Date: Sat, 17 Dec 2011 06:33:30 +0000 (-0800) Subject: Merge branch 'jk/upload-archive-use-start-command' X-Git-Tag: v1.7.9-rc0~61 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0bbaa5c076f51a0eb3ab4f53bbc5a32ce66cf954?ds=inline;hp=-c Merge branch 'jk/upload-archive-use-start-command' * jk/upload-archive-use-start-command: upload-archive: use start_command instead of fork --- 0bbaa5c076f51a0eb3ab4f53bbc5a32ce66cf954 diff --combined builtin.h index e94a5dc8a5,f2357a94cf..857b9c8aa8 --- a/builtin.h +++ b/builtin.h @@@ -14,14 -14,8 +14,14 @@@ extern const char git_usage_string[] extern const char git_more_info_string[]; extern void prune_packed_objects(int); + +struct fmt_merge_msg_opts { + unsigned add_title:1; + int shortlog_len; +}; + extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out, - int merge_title, int shortlog_len); + struct fmt_merge_msg_opts *); extern void commit_notes(struct notes_tree *t, const char *msg); struct notes_rewrite_cfg { @@@ -139,6 -133,7 +139,7 @@@ extern int cmd_update_index(int argc, c extern int cmd_update_ref(int argc, const char **argv, const char *prefix); extern int cmd_update_server_info(int argc, const char **argv, const char *prefix); extern int cmd_upload_archive(int argc, const char **argv, const char *prefix); + extern int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix); extern int cmd_upload_tar(int argc, const char **argv, const char *prefix); extern int cmd_var(int argc, const char **argv, const char *prefix); extern int cmd_verify_tag(int argc, const char **argv, const char *prefix); diff --combined t/t5000-tar-tree.sh index c05c676ca2,889842e7fc..527c9e7548 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@@ -96,7 -96,7 +96,7 @@@ test_expect_success 'git archive with - 'git archive --output=b4.tar HEAD && test_cmp b.tar b4.tar' - test_expect_success NOT_MINGW 'git archive --remote' \ + test_expect_success 'git archive --remote' \ 'git archive --remote=. HEAD >b5.tar && test_cmp b.tar b5.tar' @@@ -242,14 -242,6 +242,14 @@@ test_expect_success 'git archive --list outside of a git repo' \ 'GIT_DIR=some/non-existing/directory git archive --list' +test_expect_success 'clients cannot access unreachable commits' ' + test_commit unreachable && + sha1=`git rev-parse HEAD` && + git reset --hard HEAD^ && + git archive $sha1 >remote.tar && + test_must_fail git archive --remote=. $sha1 >remote.tar +' + test_expect_success 'git-archive --prefix=olde-' ' git archive --prefix=olde- >h.tar HEAD && ( @@@ -274,7 -266,7 +274,7 @@@ test_expect_success 'archive --list men grep "^bar\$" output ' - test_expect_success NOT_MINGW 'archive --list shows only enabled remote filters' ' + test_expect_success 'archive --list shows only enabled remote filters' ' git archive --list --remote=. >output && ! grep "^tar\.foo\$" output && grep "^bar\$" output @@@ -306,7 -298,7 +306,7 @@@ test_expect_success 'extension matchin test_cmp b.tar config-implicittar.foo ' - test_expect_success NOT_MINGW 'only enabled filters are available remotely' ' + test_expect_success 'only enabled filters are available remotely' ' test_must_fail git archive --remote=. --format=tar.foo HEAD \ >remote.tar.foo && git archive --remote=. --format=bar >remote.bar HEAD && @@@ -349,12 -341,12 +349,12 @@@ test_expect_success GZIP,GUNZIP 'extrac test_cmp b.tar j.tar ' - test_expect_success GZIP,NOT_MINGW 'remote tar.gz is allowed by default' ' + test_expect_success GZIP 'remote tar.gz is allowed by default' ' git archive --remote=. --format=tar.gz HEAD >remote.tar.gz && test_cmp j.tgz remote.tar.gz ' - test_expect_success GZIP,NOT_MINGW 'remote tar.gz can be disabled' ' + test_expect_success GZIP 'remote tar.gz can be disabled' ' git config tar.tar.gz.remote false && test_must_fail git archive --remote=. --format=tar.gz HEAD \ >remote.tar.gz