commit f6cae3ed1ef0c22150181eeebb8f9e97db99dc5a from: Christian Weisgerber date: Sun Sep 13 14:05:17 2020 UTC switch function declarations from Korn shell to Bourne/POSIX shell syntax ok stsp commit - 23c57b285fdcf9a8a0a5913ea096232038bf0ac3 commit + f6cae3ed1ef0c22150181eeebb8f9e97db99dc5a blob - 979b689d1935adced1a04b6f2a21036b105f593c blob + 85158592b22bb11f1035f97ad4835826c2218789 --- regress/cmdline/add.sh +++ regress/cmdline/add.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_add_basic { +test_add_basic() { local testroot=`test_init add_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -39,7 +39,7 @@ function test_add_basic { test_done "$testroot" "$ret" } -function test_double_add { +test_double_add() { local testroot=`test_init double_add` got checkout $testroot/repo $testroot/wt > /dev/null @@ -69,7 +69,7 @@ function test_double_add { test_done "$testroot" "$ret" } -function test_add_multiple { +test_add_multiple() { local testroot=`test_init multiple_add` got checkout $testroot/repo $testroot/wt > /dev/null @@ -102,7 +102,7 @@ function test_add_multiple { test_done "$testroot" "$ret" } -function test_add_file_in_new_subdir { +test_add_file_in_new_subdir() { local testroot=`test_init add_file_in_new_subdir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -126,7 +126,7 @@ function test_add_file_in_new_subdir { test_done "$testroot" "$ret" } -function test_add_deleted { +test_add_deleted() { local testroot=`test_init add_deleted` got checkout $testroot/repo $testroot/wt > /dev/null @@ -157,7 +157,7 @@ function test_add_deleted { test_done "$testroot" "$ret" } -function test_add_directory { +test_add_directory() { local testroot=`test_init add_directory` got checkout $testroot/repo $testroot/wt > /dev/null @@ -249,7 +249,7 @@ function test_add_directory { test_done "$testroot" "$ret" } -function test_add_clashes_with_submodule { +test_add_clashes_with_submodule() { local testroot=`test_init add_clashes_with_submodule` make_single_file_repo $testroot/repo2 foo @@ -296,7 +296,7 @@ function test_add_clashes_with_submodule { test_done "$testroot" "$ret" } -function test_add_symlink { +test_add_symlink() { local testroot=`test_init add_symlink` got checkout $testroot/repo $testroot/wt > /dev/null blob - cb4a9f95c2ad5d5d0bb9dab9f459134623827439 blob + 219e1fb124feebc4ea8b077b5fbe2cc78e072f34 --- regress/cmdline/backout.sh +++ regress/cmdline/backout.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_backout_basic { +test_backout_basic() { local testroot=`test_init backout_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -90,7 +90,7 @@ function test_backout_basic { test_done "$testroot" "$ret" } -function test_backout_edits_for_file_since_deleted { +test_backout_edits_for_file_since_deleted() { local testroot=`test_init backout_edits_for_file_since_deleted` got checkout $testroot/repo $testroot/wt > /dev/null @@ -141,7 +141,7 @@ function test_backout_edits_for_file_since_deleted { test_done "$testroot" "$ret" } -function test_backout_next_commit { +test_backout_next_commit() { local testroot=`test_init backout_next_commit` local commit0=`git_show_head $testroot/repo` blob - 892fc732795868f3edccc6adaaf43e368add9928 blob + 10d305bc5b630ca236e00ba304d323a7c271501d --- regress/cmdline/blame.sh +++ regress/cmdline/blame.sh @@ -16,7 +16,7 @@ . ./common.sh -function blame_cmp { +blame_cmp() { local testroot="$1" local file="$2" local xfail="$3" @@ -36,7 +36,7 @@ function blame_cmp { return "$ret" } -function test_blame_basic { +test_blame_basic() { local testroot=`test_init blame_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -83,7 +83,7 @@ function test_blame_basic { test_done "$testroot" "$ret" } -function test_blame_tag { +test_blame_tag() { local testroot=`test_init blame_tag` local tag=1.0.0 @@ -130,7 +130,7 @@ function test_blame_tag { test_done "$testroot" "$ret" } -function test_blame_file_single_line { +test_blame_file_single_line() { local testroot=`test_init blame_file_single_line` got checkout $testroot/repo $testroot/wt > /dev/null @@ -165,7 +165,7 @@ function test_blame_file_single_line { test_done "$testroot" "$ret" } -function test_blame_file_single_line_no_newline { +test_blame_file_single_line_no_newline() { local testroot=`test_init blame_file_single_line_no_newline` got checkout $testroot/repo $testroot/wt > /dev/null @@ -195,7 +195,7 @@ function test_blame_file_single_line_no_newline { test_done "$testroot" "$ret" } -function test_blame_all_lines_replaced { +test_blame_all_lines_replaced() { local testroot=`test_init blame_all_lines_replaced` got checkout $testroot/repo $testroot/wt > /dev/null @@ -232,7 +232,7 @@ function test_blame_all_lines_replaced { } -function test_blame_lines_shifted_up { +test_blame_lines_shifted_up() { local testroot=`test_init blame_lines_shifted_up` got checkout $testroot/repo $testroot/wt > /dev/null @@ -288,7 +288,7 @@ function test_blame_lines_shifted_up { test_done "$testroot" "$ret" } -function test_blame_lines_shifted_down { +test_blame_lines_shifted_down() { local testroot=`test_init blame_lines_shifted_down` got checkout $testroot/repo $testroot/wt > /dev/null @@ -358,7 +358,7 @@ function test_blame_lines_shifted_down { test_done "$testroot" "$ret" } -function test_blame_commit_subsumed { +test_blame_commit_subsumed() { local testroot=`test_init blame_commit_subsumed` got checkout $testroot/repo $testroot/wt > /dev/null @@ -537,7 +537,7 @@ EOF test_done "$testroot" "$ret" } -function test_blame_blame_h { +test_blame_blame_h() { local testroot=`test_init blame_blame_h` got checkout $testroot/repo $testroot/wt > /dev/null @@ -681,7 +681,7 @@ EOF test_done "$testroot" "$ret" } -function test_blame_added_on_branch { +test_blame_added_on_branch() { local testroot=`test_init blame_added_on_branch` got branch -r $testroot/repo -c master newbranch @@ -731,7 +731,7 @@ function test_blame_added_on_branch { test_done "$testroot" "$ret" } -function test_blame_submodule { +test_blame_submodule() { local testroot=`test_init blame_submodule` local commit_id0=`git_show_head $testroot/repo` local author_time=`git_show_author_time $testroot/repo` @@ -762,7 +762,7 @@ function test_blame_submodule { test_done "$testroot" "$ret" } -function test_blame_symlink { +test_blame_symlink() { local testroot=`test_init blame_symlink` local commit_id0=`git_show_head $testroot/repo` local short_commit0=`trim_obj_id 32 $commit_id0` blob - 91a36a5d9eaeb6170ed3dbab654218e4f01568f7 blob + 9fa183b2eebc74ed731072735c4286255113533b --- regress/cmdline/branch.sh +++ regress/cmdline/branch.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_branch_create { +test_branch_create() { local testroot=`test_init branch_create` local commit_id0=`git_show_head $testroot/repo` @@ -126,7 +126,7 @@ function test_branch_create { test_done "$testroot" "$ret" } -function test_branch_list { +test_branch_list() { local testroot=`test_init branch_list` local commit_id=`git_show_head $testroot/repo` @@ -233,7 +233,7 @@ function test_branch_list { test_done "$testroot" "$ret" } -function test_branch_delete { +test_branch_delete() { local testroot=`test_init branch_delete` local commit_id=`git_show_head $testroot/repo` @@ -299,7 +299,7 @@ function test_branch_delete { test_done "$testroot" "$ret" } -function test_branch_delete_current_branch { +test_branch_delete_current_branch() { local testroot=`test_init branch_delete_current_branch` local commit_id=`git_show_head $testroot/repo` @@ -324,7 +324,7 @@ function test_branch_delete_current_branch { test_done "$testroot" "$ret" } -function test_branch_delete_packed { +test_branch_delete_packed() { local testroot=`test_init branch_delete_packed` local commit_id=`git_show_head $testroot/repo` @@ -392,7 +392,7 @@ function test_branch_delete_packed { test_done "$testroot" "$ret" } -function test_branch_show { +test_branch_show() { local testroot=`test_init branch_show` local commit_id=`git_show_head $testroot/repo` blob - 732a0c8020d30553b7a2424e9ef32a29d071c966 blob + f2bd8da09c99bb8206cff02563a53409c9f80351 --- regress/cmdline/cat.sh +++ regress/cmdline/cat.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_cat_basic { +test_cat_basic() { local testroot=`test_init cat_basic` local commit_id=`git_show_head $testroot/repo` local author_time=`git_show_author_time $testroot/repo` @@ -72,7 +72,7 @@ function test_cat_basic { } -function test_cat_path { +test_cat_path() { local testroot=`test_init cat_path` local commit_id=`git_show_head $testroot/repo` local author_time=`git_show_author_time $testroot/repo` @@ -202,7 +202,7 @@ function test_cat_path { test_done "$testroot" "$ret" } -function test_cat_submodule { +test_cat_submodule() { local testroot=`test_init cat_submodule` make_single_file_repo $testroot/repo2 foo @@ -230,7 +230,7 @@ function test_cat_submodule { test_done "$testroot" "$ret" } -function test_cat_submodule_of_same_repo { +test_cat_submodule_of_same_repo() { local testroot=`test_init cat_submodule_of_same_repo` local commit_id0=`git_show_head $testroot/repo` local author_time=`git_show_author_time $testroot/repo` @@ -259,7 +259,7 @@ function test_cat_submodule_of_same_repo { test_done "$testroot" "$ret" } -function test_cat_symlink { +test_cat_symlink() { local testroot=`test_init cat_symlink` local commit_id=`git_show_head $testroot/repo` local author_time=`git_show_author_time $testroot/repo` blob - d5bdc80feeb60dad0d9501ce585f7d9d48c67d75 blob + 5e018f600067c84e853f29b8bdc2f18470f40437 --- regress/cmdline/checkout.sh +++ regress/cmdline/checkout.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_checkout_basic { +test_checkout_basic() { local testroot=`test_init checkout_basic` echo "A $testroot/wt/alpha" > $testroot/stdout.expected @@ -55,7 +55,7 @@ function test_checkout_basic { test_done "$testroot" "$ret" } -function test_checkout_dir_exists { +test_checkout_dir_exists() { local testroot=`test_init checkout_dir_exists` echo "A $testroot/wt/alpha" > $testroot/stdout.expected @@ -96,7 +96,7 @@ function test_checkout_dir_exists { test_done "$testroot" "$ret" } -function test_checkout_dir_not_empty { +test_checkout_dir_not_empty() { local testroot=`test_init checkout_dir_not_empty` echo "A $testroot/wt/alpha" > $testroot/stdout.expected @@ -137,7 +137,7 @@ function test_checkout_dir_not_empty { } -function test_checkout_sets_xbit { +test_checkout_sets_xbit() { local testroot=`test_init checkout_sets_xbit 1` touch $testroot/repo/xfile @@ -172,7 +172,7 @@ function test_checkout_sets_xbit { test_done "$testroot" "$ret" } -function test_checkout_commit_from_wrong_branch { +test_checkout_commit_from_wrong_branch() { local testroot=`test_init checkout_commit_from_wrong_branch` (cd $testroot/repo && git checkout -q -b newbranch) @@ -216,7 +216,7 @@ function test_checkout_commit_from_wrong_branch { test_done "$testroot" "$ret" } -function test_checkout_tag { +test_checkout_tag() { local testroot=`test_init checkout_tag` local tag="1.0.0" @@ -258,7 +258,7 @@ function test_checkout_tag { test_done "$testroot" "$ret" } -function test_checkout_ignores_submodules { +test_checkout_ignores_submodules() { local testroot=`test_init checkout_ignores_submodules` make_single_file_repo $testroot/repo2 foo @@ -303,7 +303,7 @@ function test_checkout_ignores_submodules { test_done "$testroot" "$ret" } -function test_checkout_read_only { +test_checkout_read_only() { local testroot=`test_init checkout_read_only` # Make the repostiory read-only @@ -363,7 +363,7 @@ function test_checkout_read_only { test_done "$testroot" "$ret" } -function test_checkout_into_nonempty_dir { +test_checkout_into_nonempty_dir() { local testroot=`test_init checkout_into_nonempty_dir` mkdir -p $testroot/wt @@ -503,7 +503,7 @@ function test_checkout_into_nonempty_dir { test_done "$testroot" "$ret" } -function test_checkout_symlink { +test_checkout_symlink() { local testroot=`test_init checkout_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -649,7 +649,7 @@ function test_checkout_symlink { test_done "$testroot" "$ret" } -function test_checkout_symlink_relative_wtpath { +test_checkout_symlink_relative_wtpath() { local testroot=`test_init checkout_symlink_with_wtpath` (cd $testroot/repo && ln -s alpha alpha.link) blob - 9b76a9b02e1aa261139ca72cd49ed6c46c05de43 blob + 759292c28dbfd727a1e32e515a955160f6131b6b --- regress/cmdline/cherrypick.sh +++ regress/cmdline/cherrypick.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_cherrypick_basic { +test_cherrypick_basic() { local testroot=`test_init cherrypick_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -93,7 +93,7 @@ function test_cherrypick_basic { test_done "$testroot" "$ret" } -function test_cherrypick_root_commit { +test_cherrypick_root_commit() { local testroot=`test_init cherrypick_root_commit` got checkout $testroot/repo $testroot/wt > /dev/null @@ -155,7 +155,7 @@ function test_cherrypick_root_commit { test_done "$testroot" "$ret" } -function test_cherrypick_into_work_tree_with_conflicts { +test_cherrypick_into_work_tree_with_conflicts() { local testroot=`test_init cherrypick_into_work_tree_with_conflicts` got checkout $testroot/repo $testroot/wt > /dev/null @@ -234,7 +234,7 @@ function test_cherrypick_into_work_tree_with_conflicts test_done "$testroot" "$ret" } -function test_cherrypick_modified_submodule { +test_cherrypick_modified_submodule() { local testroot=`test_init cherrypick_modified_submodules` make_single_file_repo $testroot/repo2 foo @@ -267,7 +267,7 @@ function test_cherrypick_modified_submodule { test_done "$testroot" "$ret" } -function test_cherrypick_added_submodule { +test_cherrypick_added_submodule() { local testroot=`test_init cherrypick_added_submodules` got checkout $testroot/repo $testroot/wt > /dev/null @@ -292,7 +292,7 @@ function test_cherrypick_added_submodule { test_done "$testroot" "$ret" } -function test_cherrypick_conflict_wt_file_vs_repo_submodule { +test_cherrypick_conflict_wt_file_vs_repo_submodule() { local testroot=`test_init cherrypick_conflict_wt_file_vs_repo_submodule` got checkout $testroot/repo $testroot/wt > /dev/null @@ -345,7 +345,7 @@ function test_cherrypick_conflict_wt_file_vs_repo_subm test_done "$testroot" "$ret" } -function test_cherrypick_modified_symlinks { +test_cherrypick_modified_symlinks() { local testroot=`test_init cherrypick_modified_symlinks` (cd $testroot/repo && ln -s alpha alpha.link) @@ -458,7 +458,7 @@ function test_cherrypick_modified_symlinks { test_done "$testroot" "0" } -function test_cherrypick_symlink_conflicts { +test_cherrypick_symlink_conflicts() { local testroot=`test_init cherrypick_symlink_conflicts` (cd $testroot/repo && ln -s alpha alpha.link) @@ -732,7 +732,7 @@ function test_cherrypick_symlink_conflicts { test_done "$testroot" "0" } -function test_cherrypick_with_path_prefix_and_empty_tree { +test_cherrypick_with_path_prefix_and_empty_tree() { local testroot=`test_init cherrypick_with_path_prefix_and_empty_tree 1` (cd $testroot/repo && git commit --allow-empty \ blob - 140179dfbd7c4ebb55a34d7a4bb4c53d7d6e615b blob + 7ad2a2f1a59a577580c1f8c552f7c07b5cbd9b76 --- regress/cmdline/clone.sh +++ regress/cmdline/clone.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_clone_basic { +test_clone_basic() { local testroot=`test_init clone_basic` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -89,7 +89,7 @@ function test_clone_basic { test_done "$testroot" "$ret" } -function test_clone_list { +test_clone_list() { local testroot=`test_init clone_list` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -117,7 +117,7 @@ function test_clone_list { test_done "$testroot" "$ret" } -function test_clone_branch { +test_clone_branch() { local testroot=`test_init clone_branch` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -153,7 +153,7 @@ function test_clone_branch { test_done "$testroot" "$ret" } -function test_clone_all { +test_clone_all() { local testroot=`test_init clone_all` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -193,7 +193,7 @@ function test_clone_all { test_done "$testroot" "$ret" } -function test_clone_mirror { +test_clone_mirror() { local testroot=`test_init clone_mirror` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -228,7 +228,7 @@ function test_clone_mirror { test_done "$testroot" "$ret" } -function test_clone_mirror_all { +test_clone_mirror_all() { local testroot=`test_init clone_mirror_all` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -263,7 +263,7 @@ function test_clone_mirror_all { test_done "$testroot" "$ret" } -function test_clone_reference { +test_clone_reference() { local testroot=`test_init clone_reference` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -302,7 +302,7 @@ function test_clone_reference { test_done "$testroot" "$ret" } -function test_clone_branch_and_reference { +test_clone_branch_and_reference() { local testroot=`test_init clone_reference` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -339,7 +339,7 @@ function test_clone_branch_and_reference { test_done "$testroot" "$ret" } -function test_clone_reference_mirror { +test_clone_reference_mirror() { local testroot=`test_init clone_reference_mirror` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` blob - 7e2e93f01cb45ae2344a72007a67db4942a023f5 blob + afd416223df26a16e6b2f6a618074947883e44e3 --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_commit_basic { +test_commit_basic() { local testroot=`test_init commit_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -47,7 +47,7 @@ function test_commit_basic { test_done "$testroot" "$ret" } -function test_commit_new_subdir { +test_commit_new_subdir() { local testroot=`test_init commit_new_subdir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -79,7 +79,7 @@ function test_commit_new_subdir { test_done "$testroot" "$ret" } -function test_commit_subdir { +test_commit_subdir() { local testroot=`test_init commit_subdir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -107,7 +107,7 @@ function test_commit_subdir { test_done "$testroot" "$ret" } -function test_commit_single_file { +test_commit_single_file() { local testroot=`test_init commit_single_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -135,7 +135,7 @@ function test_commit_single_file { test_done "$testroot" "$ret" } -function test_commit_out_of_date { +test_commit_out_of_date() { local testroot=`test_init commit_out_of_date` local first_commit=`git_show_head $testroot/repo` @@ -199,7 +199,7 @@ function test_commit_out_of_date { test_done "$testroot" "$ret" } -function test_commit_added_subdirs { +test_commit_added_subdirs() { local testroot=`test_init commit_added_subdirs` got checkout $testroot/repo $testroot/wt > /dev/null @@ -238,7 +238,7 @@ function test_commit_added_subdirs { test_done "$testroot" "$ret" } -function test_commit_deleted_subdirs { +test_commit_deleted_subdirs() { local testroot=`test_init commit_deleted_subdirs` got checkout $testroot/repo $testroot/wt > /dev/null @@ -279,7 +279,7 @@ function test_commit_deleted_subdirs { test_done "$testroot" "$ret" } -function test_commit_rejects_conflicted_file { +test_commit_rejects_conflicted_file() { local testroot=`test_init commit_rejects_conflicted_file` local initial_rev=`git_show_head $testroot/repo` @@ -336,7 +336,7 @@ function test_commit_rejects_conflicted_file { test_done "$testroot" "$ret" } -function test_commit_single_file_multiple { +test_commit_single_file_multiple() { local testroot=`test_init commit_single_file_multiple` got checkout $testroot/repo $testroot/wt > /dev/null @@ -368,7 +368,7 @@ function test_commit_single_file_multiple { test_done "$testroot" "0" } -function test_commit_added_and_modified_in_same_dir { +test_commit_added_and_modified_in_same_dir() { local testroot=`test_init commit_added_and_modified_in_same_dir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -399,7 +399,7 @@ function test_commit_added_and_modified_in_same_dir { test_done "$testroot" "$ret" } -function test_commit_path_prefix { +test_commit_path_prefix() { local testroot=`test_init commit_path_prefix` local commit1=`git_show_head $testroot/repo` @@ -498,7 +498,7 @@ function test_commit_path_prefix { return "$ret" } -function test_commit_dir_path { +test_commit_dir_path() { local testroot=`test_init commit_dir_path` got checkout $testroot/repo $testroot/wt > /dev/null @@ -536,7 +536,7 @@ function test_commit_dir_path { test_done "$testroot" "$ret" } -function test_commit_selected_paths { +test_commit_selected_paths() { local testroot=`test_init commit_selected_paths` got checkout $testroot/repo $testroot/wt > /dev/null @@ -588,7 +588,7 @@ function test_commit_selected_paths { test_done "$testroot" "$ret" } -function test_commit_outside_refs_heads { +test_commit_outside_refs_heads() { local testroot=`test_init commit_outside_refs_heads` got ref -r $testroot/repo -c master refs/remotes/origin/master @@ -633,7 +633,7 @@ function test_commit_outside_refs_heads { test_done "$testroot" "$ret" } -function test_commit_no_email { +test_commit_no_email() { local testroot=`test_init commit_no_email` got checkout $testroot/repo $testroot/wt > /dev/null @@ -670,7 +670,7 @@ function test_commit_no_email { test_done "$testroot" "$ret" } -function test_commit_tree_entry_sorting { +test_commit_tree_entry_sorting() { local testroot=`test_init commit_tree_entry_sorting` got checkout $testroot/repo $testroot/wt > /dev/null @@ -699,7 +699,7 @@ function test_commit_tree_entry_sorting { test_done "$testroot" "$ret" } -function test_commit_gotconfig_author { +test_commit_gotconfig_author() { local testroot=`test_init commit_gotconfig_author` got checkout $testroot/repo $testroot/wt > /dev/null @@ -736,7 +736,7 @@ function test_commit_gotconfig_author { test_done "$testroot" "$ret" } -function test_commit_gotconfig_worktree_author { +test_commit_gotconfig_worktree_author() { local testroot=`test_init commit_gotconfig_worktree_author` got checkout $testroot/repo $testroot/wt > /dev/null @@ -775,7 +775,7 @@ function test_commit_gotconfig_worktree_author { test_done "$testroot" "$ret" } -function test_commit_gitconfig_author { +test_commit_gitconfig_author() { local testroot=`test_init commit_gitconfig_author` got checkout $testroot/repo $testroot/wt > /dev/null @@ -813,7 +813,7 @@ function test_commit_gitconfig_author { test_done "$testroot" "$ret" } -function test_commit_xbit_change { +test_commit_xbit_change() { local testroot=`test_init commit_xbit_change` got checkout $testroot/repo $testroot/wt > /dev/null @@ -911,7 +911,7 @@ function test_commit_xbit_change { test_done "$testroot" "$ret" } -function commit_check_mode { +commit_check_mode() { local mode="$1" local expected_mode="$2" @@ -951,7 +951,7 @@ function commit_check_mode { return $ret } -function test_commit_normalizes_filemodes { +test_commit_normalizes_filemodes() { local testroot=`test_init commit_normalizes_filemodes` got checkout $testroot/repo $testroot/wt > /dev/null @@ -988,7 +988,7 @@ function test_commit_normalizes_filemodes { test_done "$testroot" "$ret" } -function test_commit_with_unrelated_submodule { +test_commit_with_unrelated_submodule() { local testroot=`test_init commit_with_unrelated_submodule` make_single_file_repo $testroot/repo2 foo @@ -1028,7 +1028,7 @@ function test_commit_with_unrelated_submodule { test_done "$testroot" "$ret" } -function check_symlinks { +check_symlinks() { local wtpath="$1" if ! [ -h $wtpath/alpha.link ]; then echo "alpha.link is not a symlink" @@ -1100,7 +1100,7 @@ function check_symlinks { return 0 } -function test_commit_symlink { +test_commit_symlink() { local testroot=`test_init commit_symlink` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1258,7 +1258,7 @@ EOF test_done "$testroot" "$ret" } -function test_commit_fix_bad_symlink { +test_commit_fix_bad_symlink() { local testroot=`test_init commit_fix_bad_symlink` got checkout $testroot/repo $testroot/wt > /dev/null blob - 17295f7a9ec3b7c9b92424f250ff997a36a7621d blob + e95df3908f366957e8608730cd2dc49e62155ac0 --- regress/cmdline/common.sh +++ regress/cmdline/common.sh @@ -24,12 +24,12 @@ export GOT_LOG_DEFAULT_LIMIT=0 export MALLOC_OPTIONS=S -function git_init +git_init() { git init -q "$1" } -function maybe_pack_repo +maybe_pack_repo() { local repo="$1" if [ -n "$GOT_TEST_PACK" ]; then @@ -37,7 +37,7 @@ function maybe_pack_repo fi } -function git_commit +git_commit() { local repo="$1" shift @@ -45,20 +45,20 @@ function git_commit maybe_pack_repo $repo } -function git_rm +git_rm() { local repo="$1" shift (cd $repo && git rm -q "$@") } -function git_show_head +git_show_head() { local repo="$1" (cd $repo && git show --no-patch --pretty='format:%H') } -function git_show_branch_head +git_show_branch_head() { local repo="$1" local branch="$2" @@ -66,14 +66,14 @@ function git_show_branch_head } -function git_show_author_time +git_show_author_time() { local repo="$1" local object="$2" (cd $repo && git show --no-patch --pretty='format:%at' $object) } -function git_show_tagger_time +git_show_tagger_time() { local repo="$1" local tag="$2" @@ -81,20 +81,20 @@ function git_show_tagger_time sed -e "s/^tagger $GOT_AUTHOR//" | cut -d' ' -f2) } -function git_show_parent_commit +git_show_parent_commit() { local repo="$1" local commit="$2" (cd $repo && git show --no-patch --pretty='format:%P' $commit) } -function git_show_tree +git_show_tree() { local repo="$1" (cd $repo && git show --no-patch --pretty='format:%T') } -function trim_obj_id +trim_obj_id() { let trimcount=$1 id=$2 @@ -108,7 +108,7 @@ function trim_obj_id echo ${id%$pat} } -function git_commit_tree +git_commit_tree() { local repo="$1" local msg="$2" @@ -117,7 +117,7 @@ function git_commit_tree maybe_pack_repo $repo } -function make_test_tree +make_test_tree() { repo="$1" @@ -129,7 +129,7 @@ function make_test_tree echo zeta > $repo/epsilon/zeta } -function make_single_file_repo +make_single_file_repo() { repo="$1" file="$2" @@ -141,7 +141,7 @@ function make_single_file_repo git_commit $repo -m "intialize $repo with file $file" } -function get_loose_object_path +get_loose_object_path() { local repo="$1" local id="$2" @@ -150,7 +150,7 @@ function get_loose_object_path echo "$repo/.git/objects/$id0/$idrest" } -function get_blob_id +get_blob_id() { repo="$1" tree_path="$2" @@ -160,7 +160,7 @@ function get_blob_id cut -d' ' -f 1 } -function test_init +test_init() { local testname="$1" local no_tree="$2" @@ -180,7 +180,7 @@ function test_init echo "$testroot" } -function test_cleanup +test_cleanup() { local testroot="$1" @@ -197,7 +197,7 @@ function test_cleanup rm -rf "$testroot" } -function test_parseargs +test_parseargs() { args=`getopt q $*` if [ $? -ne 0 ]; then @@ -217,7 +217,7 @@ function test_parseargs done } -function run_test +run_test() { testfunc="$1" if [ -z "$GOT_TEST_QUIET" ]; then @@ -226,7 +226,7 @@ function run_test $testfunc } -function test_done +test_done() { local testroot="$1" local result="$2" blob - 5a961c237e6c8d29f6f6e6568d3dea3bd6b9036b blob + 4c4531a4ae60dadd0d142ce72c1daa296710eefb --- regress/cmdline/diff.sh +++ regress/cmdline/diff.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_diff_basic { +test_diff_basic() { local testroot=`test_init diff_basic` local head_rev=`git_show_head $testroot/repo` @@ -89,7 +89,7 @@ function test_diff_basic { test_done "$testroot" "$ret" } -function test_diff_shows_conflict { +test_diff_shows_conflict() { local testroot=`test_init diff_shows_conflict 1` echo "1" > $testroot/repo/numbers @@ -178,7 +178,7 @@ function test_diff_shows_conflict { test_done "$testroot" "$ret" } -function test_diff_tag { +test_diff_tag() { local testroot=`test_init diff_tag` local commit_id0=`git_show_head $testroot/repo` local tag1=1.0.0 @@ -239,7 +239,7 @@ function test_diff_tag { test_done "$testroot" "$ret" } -function test_diff_lightweight_tag { +test_diff_lightweight_tag() { local testroot=`test_init diff_tag` local commit_id0=`git_show_head $testroot/repo` local tag1=1.0.0 @@ -300,7 +300,7 @@ function test_diff_lightweight_tag { test_done "$testroot" "$ret" } -function test_diff_ignore_whitespace { +test_diff_ignore_whitespace() { local testroot=`test_init diff_ignore_whitespace` local commit_id0=`git_show_head $testroot/repo` @@ -329,7 +329,7 @@ function test_diff_ignore_whitespace { test_done "$testroot" "$ret" } -function test_diff_submodule_of_same_repo { +test_diff_submodule_of_same_repo() { local testroot=`test_init diff_submodule_of_same_repo` (cd $testroot && git clone -q repo repo2 >/dev/null) @@ -362,7 +362,7 @@ function test_diff_submodule_of_same_repo { test_done "$testroot" "$ret" } -function test_diff_symlinks_in_work_tree { +test_diff_symlinks_in_work_tree() { local testroot=`test_init diff_symlinks_in_work_tree` (cd $testroot/repo && ln -s alpha alpha.link) @@ -466,7 +466,7 @@ function test_diff_symlinks_in_work_tree { test_done "$testroot" "$ret" } -function test_diff_symlinks_in_repo { +test_diff_symlinks_in_repo() { local testroot=`test_init diff_symlinks_in_repo` (cd $testroot/repo && ln -s alpha alpha.link) blob - a131768e455946cd8609feb790b2dd1a83b1644c blob + 059c1dc9b29d8efbb092fcd4eaf3bbccc36da1c3 --- regress/cmdline/fetch.sh +++ regress/cmdline/fetch.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_fetch_basic { +test_fetch_basic() { local testroot=`test_init fetch_basic` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -119,7 +119,7 @@ function test_fetch_basic { test_done "$testroot" "$ret" } -function test_fetch_list { +test_fetch_list() { local testroot=`test_init fetch_list` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -156,7 +156,7 @@ function test_fetch_list { test_done "$testroot" "$ret" } -function test_fetch_branch { +test_fetch_branch() { local testroot=`test_init fetch_branch` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -263,7 +263,7 @@ function test_fetch_branch { test_done "$testroot" "$ret" } -function test_fetch_all { +test_fetch_all() { local testroot=`test_init fetch_all` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -329,7 +329,7 @@ function test_fetch_all { test_done "$testroot" "$ret" } -function test_fetch_empty_packfile { +test_fetch_empty_packfile() { local testroot=`test_init fetch_empty_packfile` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -397,7 +397,7 @@ function test_fetch_empty_packfile { test_done "$testroot" "$ret" } -function test_fetch_delete_branch { +test_fetch_delete_branch() { local testroot=`test_init fetch_delete_branch` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -510,7 +510,7 @@ function test_fetch_delete_branch { } -function test_fetch_update_tag { +test_fetch_update_tag() { local testroot=`test_init fetch_update_tag` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -670,7 +670,7 @@ function test_fetch_update_tag { test_done "$testroot" "$ret" } -function test_fetch_reference { +test_fetch_reference() { local testroot=`test_init fetch_reference` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -758,7 +758,7 @@ function test_fetch_reference { } -function test_fetch_replace_symref { +test_fetch_replace_symref() { local testroot=`test_init fetch_replace_symref` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -823,7 +823,7 @@ function test_fetch_replace_symref { } -function test_fetch_update_headref { +test_fetch_update_headref() { local testroot=`test_init fetch_update_headref` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -891,7 +891,7 @@ function test_fetch_update_headref { test_done "$testroot" "$ret" } -function test_fetch_headref_deleted_locally { +test_fetch_headref_deleted_locally() { local testroot=`test_init fetch_headref_deleted_locally` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` @@ -948,7 +948,7 @@ function test_fetch_headref_deleted_locally { test_done "$testroot" "$ret" } -function test_fetch_gotconfig_remote_repo { +test_fetch_gotconfig_remote_repo() { local testroot=`test_init fetch_gotconfig_remote_repo` local testurl=ssh://127.0.0.1/$testroot local commit_id=`git_show_head $testroot/repo` blob - 5fe2eaa45ef687e1483d7805ee81a7cde2864933 blob + 75c501712bfeacfa0e4a1afe24ac2372d22f7cb6 --- regress/cmdline/histedit.sh +++ regress/cmdline/histedit.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_histedit_no_op { +test_histedit_no_op() { local testroot=`test_init histedit_no_op` local orig_commit=`git_show_head $testroot/repo` @@ -136,7 +136,7 @@ function test_histedit_no_op { test_done "$testroot" "$ret" } -function test_histedit_swap { +test_histedit_swap() { local testroot=`test_init histedit_swap` local orig_commit=`git_show_head $testroot/repo` @@ -256,7 +256,7 @@ function test_histedit_swap { test_done "$testroot" "$ret" } -function test_histedit_drop { +test_histedit_drop() { local testroot=`test_init histedit_drop` local orig_commit=`git_show_head $testroot/repo` @@ -362,7 +362,7 @@ function test_histedit_drop { test_done "$testroot" "$ret" } -function test_histedit_fold { +test_histedit_fold() { local testroot=`test_init histedit_fold` local orig_commit=`git_show_head $testroot/repo` @@ -477,7 +477,7 @@ function test_histedit_fold { test_done "$testroot" "$ret" } -function test_histedit_edit { +test_histedit_edit() { local testroot=`test_init histedit_edit` local orig_commit=`git_show_head $testroot/repo` @@ -622,7 +622,7 @@ function test_histedit_edit { test_done "$testroot" "$ret" } -function test_histedit_fold_last_commit { +test_histedit_fold_last_commit() { local testroot=`test_init histedit_fold_last_commit` local orig_commit=`git_show_head $testroot/repo` @@ -670,7 +670,7 @@ function test_histedit_fold_last_commit { test_done "$testroot" "$ret" } -function test_histedit_missing_commit { +test_histedit_missing_commit() { local testroot=`test_init histedit_missing_commit` local orig_commit=`git_show_head $testroot/repo` @@ -717,7 +717,7 @@ function test_histedit_missing_commit { test_done "$testroot" "$ret" } -function test_histedit_abort { +test_histedit_abort() { local testroot=`test_init histedit_abort` local orig_commit=`git_show_head $testroot/repo` @@ -831,7 +831,7 @@ function test_histedit_abort { test_done "$testroot" "$ret" } -function test_histedit_path_prefix_drop { +test_histedit_path_prefix_drop() { local testroot=`test_init histedit_path_prefix_drop` local orig_commit=`git_show_head $testroot/repo` @@ -931,7 +931,7 @@ function test_histedit_path_prefix_drop { test_done "$testroot" "$ret" } -function test_histedit_path_prefix_edit { +test_histedit_path_prefix_edit() { local testroot=`test_init histedit_path_prefix_edit` local orig_commit=`git_show_head $testroot/repo` @@ -1062,7 +1062,7 @@ function test_histedit_path_prefix_edit { test_done "$testroot" "$ret" } -function test_histedit_outside_refs_heads { +test_histedit_outside_refs_heads() { local testroot=`test_init histedit_outside_refs_heads` local commit1=`git_show_head $testroot/repo` @@ -1118,7 +1118,7 @@ function test_histedit_outside_refs_heads { test_done "$testroot" "$ret" } -function test_histedit_fold_last_commit_swap { +test_histedit_fold_last_commit_swap() { local testroot=`test_init histedit_fold_last_commit_swap` local orig_commit=`git_show_head $testroot/repo` @@ -1183,7 +1183,7 @@ function test_histedit_fold_last_commit_swap { test_done "$testroot" "$ret" } -function test_histedit_split_commit { +test_histedit_split_commit() { local testroot=`test_init histedit_split_commit` local orig_commit=`git_show_head $testroot/repo` @@ -1289,7 +1289,7 @@ function test_histedit_split_commit { } -function test_histedit_duplicate_commit_in_script { +test_histedit_duplicate_commit_in_script() { local testroot=`test_init histedit_duplicate_commit_in_script` local orig_commit=`git_show_head $testroot/repo` blob - 032f4094ad0b07a6a2cad1d9f748feaa7b754c5f blob + 6d8e522f63d95a3fa30f3656a34b5f91f348db45 --- regress/cmdline/import.sh +++ regress/cmdline/import.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_import_basic { +test_import_basic() { local testname=import_basic local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` @@ -136,7 +136,7 @@ function test_import_basic { test_done "$testroot" "$ret" } -function test_import_requires_new_branch { +test_import_requires_new_branch() { local testroot=`test_init import_requires_new_branch` mkdir $testroot/tree @@ -168,7 +168,7 @@ function test_import_requires_new_branch { } -function test_import_ignores { +test_import_ignores() { local testname=import_ignores local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` @@ -198,7 +198,7 @@ function test_import_ignores { test_done "$testroot" "$ret" } -function test_import_empty_dir { +test_import_empty_dir() { local testname=import_empty_dir local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` @@ -241,7 +241,7 @@ function test_import_empty_dir { test_done "$testroot" "$ret" } -function test_import_symlink { +test_import_symlink() { local testname=import_symlink local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` blob - def5dd9574576b07bae2bb234b983b9c5e0881de blob + 647ef6246e563eb70ba0369e986910cd0842ad52 --- regress/cmdline/integrate.sh +++ regress/cmdline/integrate.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_integrate_basic { +test_integrate_basic() { local testroot=`test_init integrate_basic` (cd $testroot/repo && git checkout -q -b newbranch) @@ -140,7 +140,7 @@ function test_integrate_basic { test_done "$testroot" "$ret" } -function test_integrate_requires_rebase_first { +test_integrate_requires_rebase_first() { local testroot=`test_init integrate_requires_rebase_first` local init_commit=`git_show_head $testroot/repo` @@ -245,7 +245,7 @@ function test_integrate_requires_rebase_first { test_done "$testroot" "$ret" } -function test_integrate_path_prefix { +test_integrate_path_prefix() { local testroot=`test_init integrate_path_prefix` (cd $testroot/repo && git checkout -q -b newbranch) @@ -308,7 +308,7 @@ function test_integrate_path_prefix { test_done "$testroot" "$ret" } -function test_integrate_backwards_in_time { +test_integrate_backwards_in_time() { local testroot=`test_init integrate_backwards_in_time` (cd $testroot/repo && git checkout -q -b newbranch) blob - 4bfea8b12107cc4df412fff424b5ca46162f5301 blob + 74ce60ea201a8a353667c2d1ef50a71807cd2377 --- regress/cmdline/log.sh +++ regress/cmdline/log.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_log_in_repo { +test_log_in_repo() { local testroot=`test_init log_in_repo` local head_rev=`git_show_head $testroot/repo` @@ -49,7 +49,7 @@ function test_log_in_repo { test_done "$testroot" "0" } -function test_log_in_bare_repo { +test_log_in_bare_repo() { local testroot=`test_init log_in_bare_repo` local head_rev=`git_show_head $testroot/repo` @@ -70,7 +70,7 @@ function test_log_in_bare_repo { test_done "$testroot" "0" } -function test_log_in_worktree { +test_log_in_worktree() { local testroot=`test_init log_in_worktree 1` make_test_tree $testroot/repo @@ -128,7 +128,7 @@ function test_log_in_worktree { test_done "$testroot" "0" } -function test_log_in_worktree_with_path_prefix { +test_log_in_worktree_with_path_prefix() { local testroot=`test_init log_in_prefixed_worktree` local head_rev=`git_show_head $testroot/repo` @@ -164,7 +164,7 @@ function test_log_in_worktree_with_path_prefix { test_done "$testroot" "0" } -function test_log_tag { +test_log_tag() { local testroot=`test_init log_tag` local commit_id=`git_show_head $testroot/repo` local tag="1.0.0" @@ -205,7 +205,7 @@ function test_log_tag { test_done "$testroot" "$ret" } -function test_log_limit { +test_log_limit() { local testroot=`test_init log_limit` local commit_id0=`git_show_head $testroot/repo` @@ -283,7 +283,7 @@ function test_log_limit { test_done "$testroot" "0" } -function test_log_patch_added_file { +test_log_patch_added_file() { local testroot=`test_init log_patch_added_file` local commit_id0=`git_show_head $testroot/repo` @@ -317,7 +317,7 @@ function test_log_patch_added_file { test_done "$testroot" "$ret" } -function test_log_nonexistent_path { +test_log_nonexistent_path() { local testroot=`test_init log_nonexistent_path` local head_rev=`git_show_head $testroot/repo` @@ -351,7 +351,7 @@ function test_log_nonexistent_path { test_done "$testroot" "$ret" } -function test_log_end_at_commit { +test_log_end_at_commit() { local testroot=`test_init log_end_at_commit` local commit_id0=`git_show_head $testroot/repo` @@ -505,7 +505,7 @@ function test_log_end_at_commit { test_done "$testroot" "0" } -function test_log_reverse_display { +test_log_reverse_display() { local testroot=`test_init log_reverse_display` local commit_id0=`git_show_head $testroot/repo` @@ -604,7 +604,7 @@ function test_log_reverse_display { test_done "$testroot" "$ret" } -function test_log_in_worktree_different_repo { +test_log_in_worktree_different_repo() { local testroot=`test_init log_in_worktree_different_repo 1` make_test_tree $testroot/repo @@ -669,7 +669,7 @@ function test_log_in_worktree_different_repo { test_done "$testroot" "0" } -function test_log_changed_paths { +test_log_changed_paths() { local testroot=`test_init log_changed_paths` local commit_id0=`git_show_head $testroot/repo` @@ -713,7 +713,7 @@ function test_log_changed_paths { test_done "$testroot" "$ret" } -function test_log_submodule { +test_log_submodule() { local testroot=`test_init log_submodule` make_single_file_repo $testroot/repo2 foo blob - c8ab6b83177b18033b0454c81ce1d1e1dabaf0cd blob + 6d48e72761668deed003b1cc1aaa9aa08f37a772 --- regress/cmdline/rebase.sh +++ regress/cmdline/rebase.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_rebase_basic { +test_rebase_basic() { local testroot=`test_init rebase_basic` (cd $testroot/repo && git checkout -q -b newbranch) @@ -136,7 +136,7 @@ function test_rebase_basic { test_done "$testroot" "$ret" } -function test_rebase_ancestry_check { +test_rebase_ancestry_check() { local testroot=`test_init rebase_ancestry_check` got checkout $testroot/repo $testroot/wt > /dev/null @@ -174,7 +174,7 @@ function test_rebase_ancestry_check { test_done "$testroot" "$ret" } -function test_rebase_continue { +test_rebase_continue() { local testroot=`test_init rebase_continue` local init_commit=`git_show_head $testroot/repo` @@ -309,7 +309,7 @@ function test_rebase_continue { test_done "$testroot" "$ret" } -function test_rebase_abort { +test_rebase_abort() { local testroot=`test_init rebase_abort` local init_commit=`git_show_head $testroot/repo` @@ -427,7 +427,7 @@ function test_rebase_abort { test_done "$testroot" "$ret" } -function test_rebase_no_op_change { +test_rebase_no_op_change() { local testroot=`test_init rebase_no_op_change` local init_commit=`git_show_head $testroot/repo` @@ -539,7 +539,7 @@ function test_rebase_no_op_change { test_done "$testroot" "$ret" } -function test_rebase_in_progress { +test_rebase_in_progress() { local testroot=`test_init rebase_in_progress` local init_commit=`git_show_head $testroot/repo` @@ -645,7 +645,7 @@ function test_rebase_in_progress { test_done "$testroot" "$ret" } -function test_rebase_path_prefix { +test_rebase_path_prefix() { local testroot=`test_init rebase_path_prefix` (cd $testroot/repo && git checkout -q -b newbranch) @@ -690,7 +690,7 @@ function test_rebase_path_prefix { test_done "$testroot" "$ret" } -function test_rebase_preserves_logmsg { +test_rebase_preserves_logmsg() { local testroot=`test_init rebase_preserves_logmsg` (cd $testroot/repo && git checkout -q -b newbranch) @@ -747,7 +747,7 @@ function test_rebase_preserves_logmsg { test_done "$testroot" "$ret" } -function test_rebase_no_commits_to_rebase { +test_rebase_no_commits_to_rebase() { local testroot=`test_init rebase_no_commits_to_rebase` got checkout $testroot/repo $testroot/wt > /dev/null @@ -796,7 +796,7 @@ function test_rebase_no_commits_to_rebase { test_done "$testroot" "$ret" } -function test_rebase_forward { +test_rebase_forward() { local testroot=`test_init rebase_forward` local commit0=`git_show_head $testroot/repo` @@ -885,7 +885,7 @@ function test_rebase_forward { test_done "$testroot" "$ret" } -function test_rebase_out_of_date { +test_rebase_out_of_date() { local testroot=`test_init rebase_out_of_date` local initial_commit=`git_show_head $testroot/repo` @@ -955,7 +955,7 @@ function test_rebase_out_of_date { test_done "$testroot" "$ret" } -function test_rebase_trims_empty_dir { +test_rebase_trims_empty_dir() { local testroot=`test_init rebase_trims_empty_dir` (cd $testroot/repo && git checkout -q -b newbranch) @@ -1060,7 +1060,7 @@ function test_rebase_trims_empty_dir { test_done "$testroot" "$ret" } -function test_rebase_delete_missing_file { +test_rebase_delete_missing_file() { local testroot=`test_init rebase_delete_missing_file` mkdir -p $testroot/repo/d/f/g @@ -1163,7 +1163,7 @@ function test_rebase_delete_missing_file { test_done "$testroot" "$ret" } -function test_rebase_rm_add_rm_file { +test_rebase_rm_add_rm_file() { local testroot=`test_init rebase_rm_add_rm_file` (cd $testroot/repo && git checkout -q -b newbranch) blob - 6e27b4bc0e7f143ef67e0716e17fb03d6822ca2b blob + 62f1dd6e5f84d9b1600f2331d03b9654474d14e1 --- regress/cmdline/ref.sh +++ regress/cmdline/ref.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_ref_create { +test_ref_create() { local testroot=`test_init ref_create` local commit_id=`git_show_head $testroot/repo` @@ -188,7 +188,7 @@ function test_ref_create { test_done "$testroot" "$ret" } -function test_ref_delete { +test_ref_delete() { local testroot=`test_init ref_delete` local commit_id=`git_show_head $testroot/repo` @@ -242,7 +242,7 @@ function test_ref_delete { test_done "$testroot" "$ret" } -function test_ref_list { +test_ref_list() { local testroot=`test_init ref_list` local commit_id=`git_show_head $testroot/repo` blob - 94dd9d801d6d4e861e55b5e5dd9006b3aad573d4 blob + 30494f9d2fef5555baa42426a08a8e7d07fe854d --- regress/cmdline/revert.sh +++ regress/cmdline/revert.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_revert_basic { +test_revert_basic() { local testroot=`test_init revert_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -52,7 +52,7 @@ function test_revert_basic { } -function test_revert_rm { +test_revert_rm() { local testroot=`test_init revert_rm` got checkout $testroot/repo $testroot/wt > /dev/null @@ -87,7 +87,7 @@ function test_revert_rm { test_done "$testroot" "$ret" } -function test_revert_add { +test_revert_add() { local testroot=`test_init revert_add` got checkout $testroot/repo $testroot/wt > /dev/null @@ -135,7 +135,7 @@ function test_revert_add { test_done "$testroot" "$ret" } -function test_revert_multiple { +test_revert_multiple() { local testroot=`test_init revert_multiple` got checkout $testroot/repo $testroot/wt > /dev/null @@ -183,7 +183,7 @@ function test_revert_multiple { test_done "$testroot" "$ret" } -function test_revert_file_in_new_subdir { +test_revert_file_in_new_subdir() { local testroot=`test_init revert_file_in_new_subdir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -221,7 +221,7 @@ function test_revert_file_in_new_subdir { } -function test_revert_no_arguments { +test_revert_no_arguments() { local testroot=`test_init revert_no_arguments` got checkout $testroot/repo $testroot/wt > /dev/null @@ -260,7 +260,7 @@ function test_revert_no_arguments { test_done "$testroot" "$ret" } -function test_revert_directory { +test_revert_directory() { local testroot=`test_init revert_directory` got checkout $testroot/repo $testroot/wt > /dev/null @@ -320,7 +320,7 @@ function test_revert_directory { test_done "$testroot" "$ret" } -function test_revert_directory_unknown { +test_revert_directory_unknown() { local testroot=`test_init revert_directory_unknown` got checkout $testroot/repo $testroot/wt > /dev/null @@ -369,7 +369,7 @@ function test_revert_directory_unknown { test_done "$testroot" "$ret" } -function test_revert_patch { +test_revert_patch() { local testroot=`test_init revert_patch` jot 16 > $testroot/repo/numbers @@ -718,7 +718,7 @@ EOF test_done "$testroot" "$ret" } -function test_revert_patch_added { +test_revert_patch_added() { local testroot=`test_init revert_patch_added` local commit_id=`git_show_head $testroot/repo` @@ -781,7 +781,7 @@ function test_revert_patch_added { test_done "$testroot" "$ret" } -function test_revert_patch_removed { +test_revert_patch_removed() { local testroot=`test_init revert_patch_removed` local commit_id=`git_show_head $testroot/repo` @@ -842,7 +842,7 @@ function test_revert_patch_removed { test_done "$testroot" "$ret" } -function test_revert_patch_one_change { +test_revert_patch_one_change() { local testroot=`test_init revert_patch_one_change` jot 16 > $testroot/repo/numbers @@ -920,7 +920,7 @@ EOF test_done "$testroot" "$ret" } -function test_revert_added_subtree { +test_revert_added_subtree() { local testroot=`test_init revert_added_subtree` got checkout $testroot/repo $testroot/wt > /dev/null @@ -990,7 +990,7 @@ function test_revert_added_subtree { test_done "$testroot" "$ret" } -function test_revert_deleted_subtree { +test_revert_deleted_subtree() { local testroot=`test_init revert_deleted_subtree` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1053,7 +1053,7 @@ function test_revert_deleted_subtree { test_done "$testroot" "$ret" } -function test_revert_symlink { +test_revert_symlink() { local testroot=`test_init revert_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -1225,7 +1225,7 @@ EOF test_done "$testroot" "$ret" } -function test_revert_patch_symlink { +test_revert_patch_symlink() { local testroot=`test_init revert_patch_symlink` (cd $testroot/repo && ln -s alpha alpha.link) blob - e159de382cd06a0f707167bfb65330fac8ddc2be blob + 149f0bdc3cc44d53a90d7d467740210e86263f89 --- regress/cmdline/rm.sh +++ regress/cmdline/rm.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_rm_basic { +test_rm_basic() { local testroot=`test_init rm_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -59,7 +59,7 @@ function test_rm_basic { test_done "$testroot" "0" } -function test_rm_with_local_mods { +test_rm_with_local_mods() { local testroot=`test_init rm_with_local_mods` got checkout $testroot/repo $testroot/wt > /dev/null @@ -100,7 +100,7 @@ function test_rm_with_local_mods { test_done "$testroot" "$ret" } -function test_double_rm { +test_double_rm() { local testroot=`test_init double_rm` got checkout $testroot/repo $testroot/wt > /dev/null @@ -135,7 +135,7 @@ function test_double_rm { test_done "$testroot" "0" } -function test_rm_and_add_elsewhere { +test_rm_and_add_elsewhere() { local testroot=`test_init rm_and_add_elsewhere` got checkout $testroot/repo $testroot/wt > /dev/null @@ -193,7 +193,7 @@ function test_rm_and_add_elsewhere { test_done "$testroot" "$ret" } -function test_rm_directory { +test_rm_directory() { local testroot=`test_init rm_directory` got checkout $testroot/repo $testroot/wt > /dev/null @@ -266,7 +266,7 @@ function test_rm_directory { test_done "$testroot" "$ret" } -function test_rm_directory_keep_files { +test_rm_directory_keep_files() { local testroot=`test_init rm_directory_keep_files` got checkout $testroot/repo $testroot/wt > /dev/null @@ -346,7 +346,7 @@ function test_rm_directory_keep_files { test_done "$testroot" "$ret" } -function test_rm_subtree { +test_rm_subtree() { local testroot=`test_init rm_subtree` got checkout $testroot/repo $testroot/wt > /dev/null @@ -404,7 +404,7 @@ function test_rm_subtree { test_done "$testroot" "$ret" } -function test_rm_symlink { +test_rm_symlink() { local testroot=`test_init rm_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -438,7 +438,7 @@ function test_rm_symlink { test_done "$testroot" "$ret" } -function test_rm_status_code { +test_rm_status_code() { local testroot=`test_init rm_status_code` got checkout $testroot/repo $testroot/wt > /dev/null blob - 422f1280eb3c485ace7c573ea30c319bc53da677 blob + 4c63c9313c4b48595f5494758ae00d53b19995d2 --- regress/cmdline/stage.sh +++ regress/cmdline/stage.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_stage_basic { +test_stage_basic() { local testroot=`test_init stage_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -44,7 +44,7 @@ function test_stage_basic { test_done "$testroot" "$ret" } -function test_stage_no_changes { +test_stage_no_changes() { local testroot=`test_init stage_no_changes` got checkout $testroot/repo $testroot/wt > /dev/null @@ -82,7 +82,7 @@ function test_stage_no_changes { test_done "$testroot" "$ret" } -function test_stage_unversioned { +test_stage_unversioned() { local testroot=`test_init stage_unversioned` got checkout $testroot/repo $testroot/wt > /dev/null @@ -144,7 +144,7 @@ function test_stage_unversioned { } -function test_stage_nonexistent { +test_stage_nonexistent() { local testroot=`test_init stage_nonexistent` got checkout $testroot/repo $testroot/wt > /dev/null @@ -166,7 +166,7 @@ function test_stage_nonexistent { test_done "$testroot" "$ret" } -function test_stage_list { +test_stage_list() { local testroot=`test_init stage_list` got checkout $testroot/repo $testroot/wt > /dev/null @@ -230,7 +230,7 @@ function test_stage_list { } -function test_stage_conflict { +test_stage_conflict() { local testroot=`test_init stage_conflict` local initial_commit=`git_show_head $testroot/repo` @@ -292,7 +292,7 @@ function test_stage_conflict { test_done "$testroot" "$ret" } -function test_stage_out_of_date { +test_stage_out_of_date() { local testroot=`test_init stage_out_of_date` local initial_commit=`git_show_head $testroot/repo` @@ -338,7 +338,7 @@ function test_stage_out_of_date { } -function test_double_stage { +test_double_stage() { local testroot=`test_init double_stage` got checkout $testroot/repo $testroot/wt > /dev/null @@ -445,7 +445,7 @@ function test_double_stage { test_done "$testroot" "$ret" } -function test_stage_status { +test_stage_status() { local testroot=`test_init stage_status` got checkout $testroot/repo $testroot/wt > /dev/null @@ -525,7 +525,7 @@ function test_stage_status { } -function test_stage_add_already_staged_file { +test_stage_add_already_staged_file() { local testroot=`test_init stage_add_already_staged_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -577,7 +577,7 @@ function test_stage_add_already_staged_file { test_done "$testroot" "$ret" } -function test_stage_rm_already_staged_file { +test_stage_rm_already_staged_file() { local testroot=`test_init stage_rm_already_staged_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -651,7 +651,7 @@ function test_stage_rm_already_staged_file { test_done "$testroot" "$ret" } -function test_stage_revert { +test_stage_revert() { local testroot=`test_init stage_revert` got checkout $testroot/repo $testroot/wt > /dev/null @@ -884,7 +884,7 @@ function test_stage_revert { test_done "$testroot" "$ret" } -function test_stage_diff { +test_stage_diff() { local testroot=`test_init stage_diff` local head_commit=`git_show_head $testroot/repo` @@ -1001,7 +1001,7 @@ function test_stage_diff { } -function test_stage_histedit { +test_stage_histedit() { local testroot=`test_init stage_histedit` local orig_commit=`git_show_head $testroot/repo` @@ -1057,7 +1057,7 @@ function test_stage_histedit { } -function test_stage_rebase { +test_stage_rebase() { local testroot=`test_init stage_rebase` (cd $testroot/repo && git checkout -q -b newbranch) @@ -1115,7 +1115,7 @@ function test_stage_rebase { test_done "$testroot" "$ret" } -function test_stage_update { +test_stage_update() { local testroot=`test_init stage_update` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1158,7 +1158,7 @@ function test_stage_update { test_done "$testroot" "$ret" } -function test_stage_commit_non_staged { +test_stage_commit_non_staged() { local testroot=`test_init stage_commit_non_staged` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1202,7 +1202,7 @@ function test_stage_commit_non_staged { test_done "$testroot" "$ret" } -function test_stage_commit_out_of_date { +test_stage_commit_out_of_date() { local testroot=`test_init stage_commit_out_of_date` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1318,7 +1318,7 @@ function test_stage_commit_out_of_date { } -function test_stage_commit { +test_stage_commit() { local testroot=`test_init stage_commit` local first_commit=`git_show_head $testroot/repo` @@ -1429,7 +1429,7 @@ function test_stage_commit { test_done "$testroot" "$ret" } -function test_stage_patch { +test_stage_patch() { local testroot=`test_init stage_patch` jot 16 > $testroot/repo/numbers @@ -1714,7 +1714,7 @@ EOF test_done "$testroot" "$ret" } -function test_stage_patch_twice { +test_stage_patch_twice() { local testroot=`test_init stage_patch_twice` jot 16 > $testroot/repo/numbers @@ -1903,7 +1903,7 @@ EOF test_done "$testroot" "$ret" } -function test_stage_patch_added { +test_stage_patch_added() { local testroot=`test_init stage_patch_added` local commit_id=`git_show_head $testroot/repo` @@ -1961,7 +1961,7 @@ function test_stage_patch_added { test_done "$testroot" "$ret" } -function test_stage_patch_added_twice { +test_stage_patch_added_twice() { local testroot=`test_init stage_patch_added_twice` local commit_id=`git_show_head $testroot/repo` @@ -2026,7 +2026,7 @@ function test_stage_patch_added_twice { test_done "$testroot" "$ret" } -function test_stage_patch_removed { +test_stage_patch_removed() { local testroot=`test_init stage_patch_removed` local commit_id=`git_show_head $testroot/repo` @@ -2085,7 +2085,7 @@ function test_stage_patch_removed { test_done "$testroot" "$ret" } -function test_stage_patch_removed_twice { +test_stage_patch_removed_twice() { local testroot=`test_init stage_patch_removed_twice` local commit_id=`git_show_head $testroot/repo` @@ -2151,7 +2151,7 @@ function test_stage_patch_removed_twice { test_done "$testroot" "$ret" } -function test_stage_patch_quit { +test_stage_patch_quit() { local testroot=`test_init stage_patch_quit` jot 16 > $testroot/repo/numbers @@ -2259,7 +2259,7 @@ EOF } -function test_stage_patch_incomplete_script { +test_stage_patch_incomplete_script() { local testroot=`test_init stage_incomplete_script` jot 16 > $testroot/repo/numbers @@ -2353,7 +2353,7 @@ EOF } -function test_stage_symlink { +test_stage_symlink() { local testroot=`test_init stage_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -2665,7 +2665,7 @@ EOF test_done "$testroot" "0" } -function test_stage_patch_symlink { +test_stage_patch_symlink() { local testroot=`test_init stage_patch_symlink` (cd $testroot/repo && ln -s alpha alpha.link) blob - 46a185350db6563b65ec99ac16de6b202254c8ad blob + 9aca32fad809caf8f50a0a3171c6f6ac997ce8ef --- regress/cmdline/status.sh +++ regress/cmdline/status.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_status_basic { +test_status_basic() { local testroot=`test_init status_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -53,7 +53,7 @@ function test_status_basic { test_done "$testroot" "$ret" } -function test_status_subdir_no_mods { +test_status_subdir_no_mods() { local testroot=`test_init status_subdir_no_mods 1` mkdir $testroot/repo/Basic/ @@ -87,7 +87,7 @@ function test_status_subdir_no_mods { test_done "$testroot" "$ret" } -function test_status_subdir_no_mods2 { +test_status_subdir_no_mods2() { local testroot=`test_init status_subdir_no_mods2 1` mkdir $testroot/repo/AST @@ -131,7 +131,7 @@ function test_status_subdir_no_mods2 { test_done "$testroot" "$ret" } -function test_status_obstructed { +test_status_obstructed() { local testroot=`test_init status_obstructed` got checkout $testroot/repo $testroot/wt > /dev/null @@ -156,7 +156,7 @@ function test_status_obstructed { test_done "$testroot" "$ret" } -function test_status_shows_local_mods_after_update { +test_status_shows_local_mods_after_update() { local testroot=`test_init status_shows_local_mods_after_update 1` echo "1" > $testroot/repo/numbers @@ -210,7 +210,7 @@ function test_status_shows_local_mods_after_update { test_done "$testroot" "$ret" } -function test_status_unversioned_subdirs { +test_status_unversioned_subdirs() { local testroot=`test_init status_unversioned_subdirs 1` mkdir $testroot/repo/cdfs/ @@ -258,7 +258,7 @@ function test_status_unversioned_subdirs { test_done "$testroot" "$ret" } -function test_status_symlink { +test_status_symlink() { local testroot=`test_init status_symlink` mkdir $testroot/repo/ramdisk/ @@ -316,7 +316,7 @@ function test_status_symlink { test_done "$testroot" "$ret" } -function test_status_shows_no_mods_after_complete_merge { +test_status_shows_no_mods_after_complete_merge() { local testroot=`test_init status_shows_no_mods_after_complete_merge 1` # make this file larger than the usual blob buffer size of 8192 @@ -369,7 +369,7 @@ function test_status_shows_no_mods_after_complete_merg test_done "$testroot" "$ret" } -function test_status_shows_conflict { +test_status_shows_conflict() { local testroot=`test_init status_shows_conflict 1` echo "1" > $testroot/repo/numbers @@ -424,7 +424,7 @@ function test_status_shows_conflict { test_done "$testroot" "$ret" } -function test_status_empty_dir { +test_status_empty_dir() { local testroot=`test_init status_empty_dir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -448,7 +448,7 @@ function test_status_empty_dir { test_done "$testroot" "$ret" } -function test_status_empty_dir_unversioned_file { +test_status_empty_dir_unversioned_file() { local testroot=`test_init status_empty_dir_unversioned_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -474,7 +474,7 @@ function test_status_empty_dir_unversioned_file { test_done "$testroot" "$ret" } -function test_status_many_paths { +test_status_many_paths() { local testroot=`test_init status_many_paths` got checkout $testroot/repo $testroot/wt > /dev/null @@ -512,7 +512,7 @@ function test_status_many_paths { test_done "$testroot" "$ret" } -function test_status_cvsignore { +test_status_cvsignore() { local testroot=`test_init status_cvsignore` got checkout $testroot/repo $testroot/wt > /dev/null @@ -585,7 +585,7 @@ function test_status_cvsignore { test_done "$testroot" "$ret" } -function test_status_gitignore { +test_status_gitignore() { local testroot=`test_init status_gitignore` got checkout $testroot/repo $testroot/wt > /dev/null @@ -634,7 +634,7 @@ function test_status_gitignore { test_done "$testroot" "$ret" } -function test_status_status_code { +test_status_status_code() { local testroot=`test_init status_status_code` got checkout $testroot/repo $testroot/wt > /dev/null blob - 4ce096b6db3b19b619126275835da465fe879e84 blob + 98ded056d8e75ba6c4fdd00c6d079d1c469e4a17 --- regress/cmdline/tag.sh +++ regress/cmdline/tag.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_tag_create { +test_tag_create() { local testroot=`test_init tag_create` local commit_id=`git_show_head $testroot/repo` local tag=1.0.0 @@ -122,7 +122,7 @@ function test_tag_create { test_done "$testroot" "$ret" } -function test_tag_list { +test_tag_list() { local testroot=`test_init tag_list` local commit_id=`git_show_head $testroot/repo` local tag=1.0.0 @@ -170,7 +170,7 @@ function test_tag_list { test_done "$testroot" "$ret" } -function test_tag_list_lightweight { +test_tag_list_lightweight() { local testroot=`test_init tag_list_lightweight` local commit_id=`git_show_head $testroot/repo` local tag=1.0.0 blob - 89a7c5142490b45ef7d5bceba771f8355f633f4d blob + 68b58e3ee50007e8b30b983b92b7e2536cb39a20 --- regress/cmdline/tree.sh +++ regress/cmdline/tree.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_tree_basic { +test_tree_basic() { local testroot=`test_init tree_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -43,7 +43,7 @@ function test_tree_basic { test_done "$testroot" "$ret" } -function test_tree_branch { +test_tree_branch() { local testroot=`test_init tree_branch` got checkout $testroot/repo $testroot/wt > /dev/null @@ -77,7 +77,7 @@ function test_tree_branch { test_done "$testroot" "$ret" } -function test_tree_submodule { +test_tree_submodule() { local testroot=`test_init tree_submodule` make_single_file_repo $testroot/repo2 foo @@ -108,7 +108,7 @@ function test_tree_submodule { test_done "$testroot" "$ret" } -function test_tree_submodule_of_same_repo { +test_tree_submodule_of_same_repo() { local testroot=`test_init tree_submodule_of_same_repo` (cd $testroot && git clone -q repo repo2 >/dev/null) blob - 6ab66e9c9cebc3388c960434cc6e013aa32c4b8b blob + 6b88ae02ec91ba9a708d70c67ddc62cdcfe66a03 --- regress/cmdline/unstage.sh +++ regress/cmdline/unstage.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_unstage_basic { +test_unstage_basic() { local testroot=`test_init unstage_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -67,7 +67,7 @@ function test_unstage_basic { test_done "$testroot" "$ret" } -function test_unstage_unversioned { +test_unstage_unversioned() { local testroot=`test_init unstage_unversioned` got checkout $testroot/repo $testroot/wt > /dev/null @@ -145,7 +145,7 @@ function test_unstage_unversioned { test_done "$testroot" "$ret" } -function test_unstage_nonexistent { +test_unstage_nonexistent() { local testroot=`test_init unstage_nonexistent` got checkout $testroot/repo $testroot/wt > /dev/null @@ -183,7 +183,7 @@ function test_unstage_nonexistent { test_done "$testroot" "$ret" } -function test_unstage_patch { +test_unstage_patch() { local testroot=`test_init unstage_patch` jot 16 > $testroot/repo/numbers @@ -665,7 +665,7 @@ EOF } -function test_unstage_patch_added { +test_unstage_patch_added() { local testroot=`test_init unstage_patch_added` local commit_id=`git_show_head $testroot/repo` @@ -733,7 +733,7 @@ function test_unstage_patch_added { test_done "$testroot" "$ret" } -function test_unstage_patch_removed { +test_unstage_patch_removed() { local testroot=`test_init unstage_patch_removed` local commit_id=`git_show_head $testroot/repo` @@ -802,7 +802,7 @@ function test_unstage_patch_removed { test_done "$testroot" "$ret" } -function test_unstage_patch_quit { +test_unstage_patch_quit() { local testroot=`test_init unstage_patch_quit` jot 16 > $testroot/repo/numbers @@ -953,7 +953,7 @@ EOF test_done "$testroot" "$ret" } -function test_unstage_symlink { +test_unstage_symlink() { local testroot=`test_init unstage_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -1135,7 +1135,7 @@ EOF test_done "$testroot" "0" } -function test_unstage_patch_symlink { +test_unstage_patch_symlink() { local testroot=`test_init unstage_patch_symlink` (cd $testroot/repo && ln -s alpha alpha.link) blob - 217f592b094a74dd27b41d9bb21f09b3a3931a0e blob + 01cca03963ab7106310fd5a83a41dcce92cfe2d2 --- regress/cmdline/update.sh +++ regress/cmdline/update.sh @@ -16,7 +16,7 @@ . ./common.sh -function test_update_basic { +test_update_basic() { local testroot=`test_init update_basic` got checkout $testroot/repo $testroot/wt > /dev/null @@ -55,7 +55,7 @@ function test_update_basic { test_done "$testroot" "$ret" } -function test_update_adds_file { +test_update_adds_file() { local testroot=`test_init update_adds_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -95,7 +95,7 @@ function test_update_adds_file { test_done "$testroot" "$ret" } -function test_update_deletes_file { +test_update_deletes_file() { local testroot=`test_init update_deletes_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -132,7 +132,7 @@ function test_update_deletes_file { test_done "$testroot" "0" } -function test_update_deletes_dir { +test_update_deletes_dir() { local testroot=`test_init update_deletes_dir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -169,7 +169,7 @@ function test_update_deletes_dir { test_done "$testroot" "0" } -function test_update_deletes_dir_with_path_prefix { +test_update_deletes_dir_with_path_prefix() { local testroot=`test_init update_deletes_dir_with_path_prefix` local first_rev=`git_show_head $testroot/repo` @@ -209,7 +209,7 @@ function test_update_deletes_dir_with_path_prefix { test_done "$testroot" "0" } -function test_update_deletes_dir_recursively { +test_update_deletes_dir_recursively() { local testroot=`test_init update_deletes_dir_recursively` local first_rev=`git_show_head $testroot/repo` @@ -252,7 +252,7 @@ function test_update_deletes_dir_recursively { test_done "$testroot" "0" } -function test_update_sibling_dirs_with_common_prefix { +test_update_sibling_dirs_with_common_prefix() { local testroot=`test_init update_sibling_dirs_with_common_prefix` got checkout $testroot/repo $testroot/wt > /dev/null @@ -315,7 +315,7 @@ function test_update_sibling_dirs_with_common_prefix { test_done "$testroot" "$ret" } -function test_update_dir_with_dot_sibling { +test_update_dir_with_dot_sibling() { local testroot=`test_init update_dir_with_dot_sibling` got checkout $testroot/repo $testroot/wt > /dev/null @@ -373,7 +373,7 @@ function test_update_dir_with_dot_sibling { test_done "$testroot" "$ret" } -function test_update_moves_files_upwards { +test_update_moves_files_upwards() { local testroot=`test_init update_moves_files_upwards` mkdir $testroot/repo/epsilon/psi @@ -427,7 +427,7 @@ function test_update_moves_files_upwards { test_done "$testroot" "0" } -function test_update_moves_files_to_new_dir { +test_update_moves_files_to_new_dir() { local testroot=`test_init update_moves_files_to_new_dir` mkdir $testroot/repo/epsilon/psi @@ -482,7 +482,7 @@ function test_update_moves_files_to_new_dir { test_done "$testroot" "0" } -function test_update_creates_missing_parent { +test_update_creates_missing_parent() { local testroot=`test_init update_creates_missing_parent 1` touch $testroot/repo/Makefile @@ -534,7 +534,7 @@ function test_update_creates_missing_parent { test_done "$testroot" "$ret" } -function test_update_creates_missing_parent_with_subdir { +test_update_creates_missing_parent_with_subdir() { local testroot=`test_init update_creates_missing_parent_with_subdir 1` touch $testroot/repo/Makefile @@ -589,7 +589,7 @@ function test_update_creates_missing_parent_with_subdi test_done "$testroot" "0" } -function test_update_file_in_subsubdir { +test_update_file_in_subsubdir() { local testroot=`test_init update_fle_in_subsubdir 1` touch $testroot/repo/Makefile @@ -629,7 +629,7 @@ function test_update_file_in_subsubdir { test_done "$testroot" "0" } -function test_update_merges_file_edits { +test_update_merges_file_edits() { local testroot=`test_init update_merges_file_edits` echo "1" > $testroot/repo/numbers @@ -710,7 +710,7 @@ function test_update_merges_file_edits { test_done "$testroot" "$ret" } -function test_update_keeps_xbit { +test_update_keeps_xbit() { local testroot=`test_init update_keeps_xbit 1` touch $testroot/repo/xfile @@ -757,7 +757,7 @@ function test_update_keeps_xbit { test_done "$testroot" "$ret" } -function test_update_clears_xbit { +test_update_clears_xbit() { local testroot=`test_init update_clears_xbit 1` touch $testroot/repo/xfile @@ -815,7 +815,7 @@ function test_update_clears_xbit { test_done "$testroot" "$ret" } -function test_update_restores_missing_file { +test_update_restores_missing_file() { local testroot=`test_init update_restores_missing_file` got checkout $testroot/repo $testroot/wt > /dev/null @@ -853,7 +853,7 @@ function test_update_restores_missing_file { test_done "$testroot" "$ret" } -function test_update_conflict_wt_add_vs_repo_add { +test_update_conflict_wt_add_vs_repo_add() { local testroot=`test_init update_conflict_wt_add_vs_repo_add` got checkout $testroot/repo $testroot/wt > /dev/null @@ -916,7 +916,7 @@ function test_update_conflict_wt_add_vs_repo_add { test_done "$testroot" "$ret" } -function test_update_conflict_wt_edit_vs_repo_rm { +test_update_conflict_wt_edit_vs_repo_rm() { local testroot=`test_init update_conflict_wt_edit_vs_repo_rm` got checkout $testroot/repo $testroot/wt > /dev/null @@ -968,7 +968,7 @@ function test_update_conflict_wt_edit_vs_repo_rm { test_done "$testroot" "$ret" } -function test_update_conflict_wt_rm_vs_repo_edit { +test_update_conflict_wt_rm_vs_repo_edit() { local testroot=`test_init update_conflict_wt_rm_vs_repo_edit` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1029,7 +1029,7 @@ function test_update_conflict_wt_rm_vs_repo_edit { test_done "$testroot" "$ret" } -function test_update_conflict_wt_rm_vs_repo_rm { +test_update_conflict_wt_rm_vs_repo_rm() { local testroot=`test_init update_conflict_wt_rm_vs_repo_rm` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1087,7 +1087,7 @@ function test_update_conflict_wt_rm_vs_repo_rm { test_done "$testroot" "0" } -function test_update_partial { +test_update_partial() { local testroot=`test_init update_partial` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1159,7 +1159,7 @@ function test_update_partial { test_done "$testroot" "$ret" } -function test_update_partial_add { +test_update_partial_add() { local testroot=`test_init update_partial_add` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1203,7 +1203,7 @@ function test_update_partial_add { test_done "$testroot" "$ret" } -function test_update_partial_rm { +test_update_partial_rm() { local testroot=`test_init update_partial_rm` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1237,7 +1237,7 @@ function test_update_partial_rm { test_done "$testroot" "$ret" } -function test_update_partial_dir { +test_update_partial_dir() { local testroot=`test_init update_partial_dir` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1281,7 +1281,7 @@ function test_update_partial_dir { } -function test_update_moved_branch_ref { +test_update_moved_branch_ref() { local testroot=`test_init update_moved_branch_ref` git clone -q --mirror $testroot/repo $testroot/repo2 @@ -1326,7 +1326,7 @@ function test_update_moved_branch_ref { test_done "$testroot" "$ret" } -function test_update_to_another_branch { +test_update_to_another_branch() { local testroot=`test_init update_to_another_branch` local base_commit=`git_show_head $testroot/repo` @@ -1402,7 +1402,7 @@ function test_update_to_another_branch { test_done "$testroot" "$ret" } -function test_update_to_commit_on_wrong_branch { +test_update_to_commit_on_wrong_branch() { local testroot=`test_init update_to_commit_on_wrong_branch` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1443,7 +1443,7 @@ function test_update_to_commit_on_wrong_branch { test_done "$testroot" "$ret" } -function test_update_bumps_base_commit_id { +test_update_bumps_base_commit_id() { local testroot=`test_init update_bumps_base_commit_id` echo "psi" > $testroot/repo/epsilon/psi @@ -1525,7 +1525,7 @@ function test_update_bumps_base_commit_id { test_done "$testroot" "$ret" } -function test_update_tag { +test_update_tag() { local testroot=`test_init update_tag` local tag="1.0.0" @@ -1566,7 +1566,7 @@ function test_update_tag { test_done "$testroot" "$ret" } -function test_update_toggles_xbit { +test_update_toggles_xbit() { local testroot=`test_init update_toggles_xbit 1` touch $testroot/repo/xfile @@ -1653,7 +1653,7 @@ function test_update_toggles_xbit { test_done "$testroot" "$ret" } -function test_update_preserves_conflicted_file { +test_update_preserves_conflicted_file() { local testroot=`test_init update_preserves_conflicted_file` local commit_id0=`git_show_head $testroot/repo` @@ -1710,7 +1710,7 @@ function test_update_preserves_conflicted_file { test_done "$testroot" "$ret" } -function test_update_modified_submodules { +test_update_modified_submodules() { local testroot=`test_init update_modified_submodules` make_single_file_repo $testroot/repo2 foo @@ -1744,7 +1744,7 @@ function test_update_modified_submodules { test_done "$testroot" "$ret" } -function test_update_adds_submodule { +test_update_adds_submodule() { local testroot=`test_init update_adds_submodule` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1772,7 +1772,7 @@ function test_update_adds_submodule { test_done "$testroot" "$ret" } -function test_update_conflict_wt_file_vs_repo_submodule { +test_update_conflict_wt_file_vs_repo_submodule() { local testroot=`test_init update_conflict_wt_file_vs_repo_submodule` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1825,7 +1825,7 @@ function test_update_conflict_wt_file_vs_repo_submodul test_done "$testroot" "$ret" } -function test_update_adds_symlink { +test_update_adds_symlink() { local testroot=`test_init update_adds_symlink` got checkout $testroot/repo $testroot/wt > /dev/null @@ -1933,7 +1933,7 @@ function test_update_adds_symlink { test_done "$testroot" "$ret" } -function test_update_deletes_symlink { +test_update_deletes_symlink() { local testroot=`test_init update_deletes_symlink` (cd $testroot/repo && ln -s alpha alpha.link) @@ -1975,7 +1975,7 @@ function test_update_deletes_symlink { test_done "$testroot" "0" } -function test_update_symlink_conflicts { +test_update_symlink_conflicts() { local testroot=`test_init update_symlink_conflicts` (cd $testroot/repo && ln -s alpha alpha.link)