summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/README6
-rw-r--r--t/helper/test-fast-rebase.c54
-rw-r--r--t/helper/test-hash-speed.c2
-rw-r--r--t/helper/test-hash.c2
-rw-r--r--t/helper/test-match-trees.c2
-rw-r--r--t/helper/test-partial-clone.c43
-rw-r--r--t/helper/test-reach.c2
-rw-r--r--t/helper/test-ref-store.c2
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rw-r--r--t/lib-git-svn.sh22
-rw-r--r--t/lib-parallel-checkout.sh2
-rw-r--r--t/lib-submodule-update.sh3
-rwxr-xr-xt/perf/p4209-pickaxe.sh70
-rwxr-xr-xt/t0000-basic.sh4
-rwxr-xr-xt/t0410-partial-clone.sh23
-rwxr-xr-xt/t1006-cat-file.sh22
-rwxr-xr-xt/t1092-sparse-checkout-compatibility.sh2
-rwxr-xr-xt/t1301-shared-repo.sh2
-rwxr-xr-xt/t1307-config-blob.sh4
-rwxr-xr-xt/t1350-config-hooks-path.sh1
-rwxr-xr-xt/t1401-symbolic-ref.sh25
-rwxr-xr-xt/t1403-show-ref.sh6
-rwxr-xr-xt/t1404-update-ref-errors.sh30
-rwxr-xr-xt/t1407-worktree-ref-store.sh9
-rwxr-xr-xt/t1413-reflog-detach.sh5
-rwxr-xr-xt/t1414-reflog-walk.sh4
-rwxr-xr-xt/t1415-worktree-refs.sh15
-rwxr-xr-xt/t2017-checkout-orphan.sh2
-rwxr-xr-xt/t2030-unresolve-info.sh3
-rwxr-xr-xt/t3202-show-branch-octopus.sh70
-rwxr-xr-xt/t3202-show-branch.sh149
-rwxr-xr-xt/t3210-pack-refs.sh2
-rwxr-xr-xt/t3513-revert-submodule.sh4
-rwxr-xr-xt/t3800-mktag.sh121
-rwxr-xr-xt/t3903-stash.sh2
-rwxr-xr-xt/t3920-crlf-messages.sh2
-rwxr-xr-xt/t4006-diff-mode.sh6
-rwxr-xr-xt/t4013-diff-various.sh24
-rw-r--r--t/t4013/diff.diff-tree_-m_master11
-rw-r--r--t/t4013/diff.log_-m_--raw_master61
-rw-r--r--t/t4013/diff.log_-m_--stat_master66
-rwxr-xr-xt/t4030-diff-textconv.sh8
-rwxr-xr-xt/t4202-log.sh18
-rwxr-xr-xt/t4203-mailmap.sh2
-rwxr-xr-xt/t4205-log-pretty-formats.sh2
-rwxr-xr-xt/t4209-log-pickaxe.sh114
-rwxr-xr-xt/t4258-am-quoted-cr.sh2
-rwxr-xr-xt/t5000-tar-tree.sh122
-rwxr-xr-xt/t5304-prune.sh83
-rwxr-xr-xt/t5319-multi-pack-index.sh13
-rwxr-xr-xt/t5406-remote-rejects.sh1
-rwxr-xr-xt/t5407-post-rewrite-hook.sh2
-rwxr-xr-xt/t5409-colorize-remote-messages.sh1
-rw-r--r--t/t5411/common-functions.sh54
-rw-r--r--t/t5411/test-0000-standard-git-push.sh82
-rw-r--r--t/t5411/test-0001-standard-git-push--porcelain.sh90
-rw-r--r--t/t5411/test-0003-pre-receive-declined--porcelain.sh8
-rw-r--r--t/t5411/test-0011-no-hook-error.sh40
-rw-r--r--t/t5411/test-0012-no-hook-error--porcelain.sh42
-rw-r--r--t/t5411/test-0013-bad-protocol.sh62
-rw-r--r--t/t5411/test-0014-bad-protocol--porcelain.sh80
-rw-r--r--t/t5411/test-0020-report-ng.sh32
-rw-r--r--t/t5411/test-0021-report-ng--porcelain.sh36
-rw-r--r--t/t5411/test-0022-report-unexpect-ref.sh26
-rw-r--r--t/t5411/test-0023-report-unexpect-ref--porcelain.sh28
-rw-r--r--t/t5411/test-0024-report-unknown-ref.sh18
-rw-r--r--t/t5411/test-0025-report-unknown-ref--porcelain.sh20
-rw-r--r--t/t5411/test-0026-push-options.sh58
-rw-r--r--t/t5411/test-0027-push-options--porcelain.sh62
-rw-r--r--t/t5411/test-0030-report-ok.sh20
-rw-r--r--t/t5411/test-0031-report-ok--porcelain.sh22
-rw-r--r--t/t5411/test-0032-report-with-options.sh186
-rw-r--r--t/t5411/test-0033-report-with-options--porcelain.sh200
-rw-r--r--t/t5411/test-0034-report-ft.sh22
-rw-r--r--t/t5411/test-0035-report-ft--porcelain.sh24
-rw-r--r--t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh132
-rw-r--r--t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh138
-rw-r--r--t/t5411/test-0038-report-mixed-refs.sh74
-rw-r--r--t/t5411/test-0039-report-mixed-refs--porcelain.sh76
-rw-r--r--t/t5411/test-0040-process-all-refs.sh80
-rw-r--r--t/t5411/test-0041-process-all-refs--porcelain.sh82
-rw-r--r--t/t5411/test-0050-proc-receive-refs-with-modifiers.sh90
-rwxr-xr-xt/t5505-remote.sh2
-rwxr-xr-xt/t5520-pull.sh10
-rwxr-xr-xt/t5548-push-porcelain.sh97
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh7
-rwxr-xr-xt/t5601-clone.sh3
-rwxr-xr-xt/t5702-protocol-v2.sh16
-rwxr-xr-xt/t6020-bundle-misc.sh93
-rwxr-xr-xt/t6041-bisect-submodule.sh4
-rwxr-xr-xt/t6120-describe.sh192
-rwxr-xr-xt/t6400-merge-df.sh16
-rwxr-xr-xt/t6402-merge-rename.sh132
-rwxr-xr-xt/t6406-merge-attr.sh18
-rwxr-xr-xt/t6421-merge-partial-clone.sh440
-rwxr-xr-xt/t6423-merge-rename-directories.sh235
-rwxr-xr-xt/t6429-merge-sequence-rename-caching.sh700
-rwxr-xr-xt/t6500-gc.sh46
-rwxr-xr-xt/t7003-filter-branch.sh7
-rwxr-xr-xt/t7509-commit-authorship.sh4
-rwxr-xr-xt/t7800-difftool.sh2
-rwxr-xr-xt/t7810-grep.sh9
-rwxr-xr-xt/t7816-grep-binary-pattern.sh4
-rwxr-xr-xt/t7900-maintenance.sh2
-rwxr-xr-xt/t9001-send-email.sh33
-rwxr-xr-xt/t9100-git-svn-basic.sh16
-rwxr-xr-xt/t9115-git-svn-dcommit-funky-renames.sh6
-rwxr-xr-xt/t9129-git-svn-i18n-commitencoding.sh4
-rwxr-xr-xt/t9300-fast-import.sh3
-rwxr-xr-xt/t9802-git-p4-filetype.sh4
-rw-r--r--t/test-lib-functions.sh94
-rw-r--r--t/test-lib.sh79
113 files changed, 3780 insertions, 1637 deletions
diff --git a/t/README b/t/README
index 1a2072b2c8..9e70122302 100644
--- a/t/README
+++ b/t/README
@@ -1126,6 +1126,12 @@ use these, and "test_set_prereq" for how to define your own.
Git wasn't compiled with NO_PTHREADS=YesPlease.
+ - REFFILES
+
+ Test is specific to packed/loose ref storage, and should be
+ disabled for other ref storage backends
+
+
Tips for Writing Tests
----------------------
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index 373212256a..fc2d460904 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -91,7 +91,6 @@ int cmd__fast_rebase(int argc, const char **argv)
struct commit *last_commit = NULL, *last_picked_commit = NULL;
struct object_id head;
struct lock_file lock = LOCK_INIT;
- int clean = 1;
struct strvec rev_walk_args = STRVEC_INIT;
struct rev_info revs;
struct commit *commit;
@@ -124,7 +123,8 @@ int cmd__fast_rebase(int argc, const char **argv)
assert(oideq(&onto->object.oid, &head));
hold_locked_index(&lock, LOCK_DIE_ON_ERROR);
- assert(repo_read_index(the_repository) >= 0);
+ if (repo_read_index(the_repository) < 0)
+ BUG("Could not read index");
repo_init_revisions(the_repository, &revs, NULL);
revs.verbose_header = 1;
@@ -175,11 +175,10 @@ int cmd__fast_rebase(int argc, const char **argv)
free((char*)merge_opt.ancestor);
merge_opt.ancestor = NULL;
if (!result.clean)
- die("Aborting: Hit a conflict and restarting is not implemented.");
+ break;
last_picked_commit = commit;
last_commit = create_commit(result.tree, commit, last_commit);
}
- fprintf(stderr, "\nDone.\n");
/* TODO: There should be some kind of rev_info_free(&revs) call... */
memset(&revs, 0, sizeof(revs));
@@ -188,24 +187,39 @@ int cmd__fast_rebase(int argc, const char **argv)
if (result.clean < 0)
exit(128);
- strbuf_addf(&reflog_msg, "finish rebase %s onto %s",
- oid_to_hex(&last_picked_commit->object.oid),
- oid_to_hex(&last_commit->object.oid));
- if (update_ref(reflog_msg.buf, branch_name.buf,
- &last_commit->object.oid,
- &last_picked_commit->object.oid,
- REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR)) {
- error(_("could not update %s"), argv[4]);
- die("Failed to update %s", argv[4]);
+ if (result.clean) {
+ fprintf(stderr, "\nDone.\n");
+ strbuf_addf(&reflog_msg, "finish rebase %s onto %s",
+ oid_to_hex(&last_picked_commit->object.oid),
+ oid_to_hex(&last_commit->object.oid));
+ if (update_ref(reflog_msg.buf, branch_name.buf,
+ &last_commit->object.oid,
+ &last_picked_commit->object.oid,
+ REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR)) {
+ error(_("could not update %s"), argv[4]);
+ die("Failed to update %s", argv[4]);
+ }
+ if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
+ die(_("unable to update HEAD"));
+ strbuf_release(&reflog_msg);
+ strbuf_release(&branch_name);
+
+ prime_cache_tree(the_repository, the_repository->index,
+ result.tree);
+ } else {
+ fprintf(stderr, "\nAborting: Hit a conflict.\n");
+ strbuf_addf(&reflog_msg, "rebase progress up to %s",
+ oid_to_hex(&last_picked_commit->object.oid));
+ if (update_ref(reflog_msg.buf, "HEAD",
+ &last_commit->object.oid,
+ &head,
+ REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR)) {
+ error(_("could not update %s"), argv[4]);
+ die("Failed to update %s", argv[4]);
+ }
}
- if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
- die(_("unable to update HEAD"));
- strbuf_release(&reflog_msg);
- strbuf_release(&branch_name);
-
- prime_cache_tree(the_repository, the_repository->index, result.tree);
if (write_locked_index(&the_index, &lock,
COMMIT_LOCK | SKIP_IF_UNCHANGED))
die(_