From d1bf1237f8ed2aa355ef7409c8b9b6dc52bdc0fd Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 19 May 2018 14:11:14 -0400 Subject: [PATCH] Fix #459, #781: Remove worktree code that changes the CWD Add tests for simple use of submodules and worktrees together with editors from subdirectories. Closes #783 Closes #508 --- NEWS.adoc | 1 + doc/manual.adoc | 1 + doc/tigrc.5.adoc | 1 + include/tig/repo.h | 1 + src/options.c | 26 +- test/diff/editor-test | 92 ++++++ test/diff/submodule-editor-diffstat-test | 81 +++++ test/diff/submodule-editor-test | 391 ++++++++++++++++++++++ test/diff/worktree-editor-test | 392 +++++++++++++++++++++++ test/status/submodule-editor-test | 62 ++++ test/status/worktree-editor-test | 59 ++++ test/tools/libgit.sh | 12 +- test/tools/libtest.sh | 7 +- test/tree/submodule-editor-test | 112 +++++++ test/tree/worktree-editor-test | 109 +++++++ 15 files changed, 1314 insertions(+), 33 deletions(-) create mode 100755 test/diff/submodule-editor-diffstat-test create mode 100755 test/diff/submodule-editor-test create mode 100755 test/diff/worktree-editor-test create mode 100755 test/status/submodule-editor-test create mode 100755 test/status/worktree-editor-test create mode 100755 test/tree/submodule-editor-test create mode 100755 test/tree/worktree-editor-test diff --git a/NEWS.adoc b/NEWS.adoc index 356e7e2e2..66b9aeef9 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -10,6 +10,7 @@ Improvements: - Update make config defaults for Cygwin to ncurses6. (GH #792) - Build against netbsd-curses. (GH #789) - Change the blame view to render more like `git blame`. (GH #812) + - Improve worktree and submodule support. (GH #459, #781, #783) Bug fixes: diff --git a/doc/manual.adoc b/doc/manual.adoc index b32842da6..f75ad3fd9 100644 --- a/doc/manual.adoc +++ b/doc/manual.adoc @@ -190,6 +190,7 @@ following variables. |%(repo:prefix) |The path prefix of the current work directory, e.g `subdir/`. |%(repo:git-dir) |The path to the Git directory, e.g. `/src/repo/.git`. +|%(repo:worktree) |The worktree path, if defined. |%(repo:is-inside-work-tree) |Whether Tig is running inside a work tree, either `true` or `false`. diff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc index f75cff997..9ba1be4d2 100644 --- a/doc/tigrc.5.adoc +++ b/doc/tigrc.5.adoc @@ -705,6 +705,7 @@ following variable names, which are substituted before commands are run: |%(repo:prefix) |The path prefix of the current work directory, e.g `subdir/`. |%(repo:git-dir) |The path to the Git directory, e.g. `/src/repo/.git`. +|%(repo:worktree) |The worktree path, if defined. |%(repo:is-inside-work-tree) |Whether Tig is running inside a work tree, either `true` or `false`. diff --git a/include/tig/repo.h b/include/tig/repo.h index f227b1b39..40bd126fd 100644 --- a/include/tig/repo.h +++ b/include/tig/repo.h @@ -27,6 +27,7 @@ typedef char repo_str[SIZEOF_STR]; _(repo_str, cdup) \ _(repo_str, prefix) \ _(repo_str, git_dir) \ + _(repo_str, worktree) \ _(bool, is_inside_work_tree) #define REPO_INFO_FIELDS(type, name) type name; diff --git a/src/options.c b/src/options.c index bf4951f18..bcef40c86 100644 --- a/src/options.c +++ b/src/options.c @@ -1334,30 +1334,6 @@ set_repo_config_option(char *name, char *value, enum status_code (*cmd)(int, con warn("Option 'tig.%s': %s", name, get_status_message(code)); } -static void -set_work_tree(const char *value) -{ - char cwd[SIZEOF_STR]; - - if (!getcwd(cwd, sizeof(cwd))) - die("Failed to get cwd path: %s", strerror(errno)); - if (chdir(cwd) < 0) - die("Failed to chdir(%s): %s", cwd, strerror(errno)); - if (chdir(repo.git_dir) < 0) - die("Failed to chdir(%s): %s", repo.git_dir, strerror(errno)); - if (!getcwd(repo.git_dir, sizeof(repo.git_dir))) - die("Failed to get git path: %s", strerror(errno)); - if (chdir(value) < 0) - die("Failed to chdir(%s): %s", value, strerror(errno)); - if (!getcwd(cwd, sizeof(cwd))) - die("Failed to get cwd path: %s", strerror(errno)); - if (setenv("GIT_WORK_TREE", cwd, true)) - die("Failed to set GIT_WORK_TREE to '%s'", cwd); - if (setenv("GIT_DIR", repo.git_dir, true)) - die("Failed to set GIT_DIR to '%s'", repo.git_dir); - repo.is_inside_work_tree = true; -} - static struct line_info * parse_git_color_option(struct line_info *info, char *value) { @@ -1449,7 +1425,7 @@ read_repo_config_option(char *name, size_t namelen, char *value, size_t valuelen string_ncopy(opt_editor, value, valuelen); else if (!strcmp(name, "core.worktree")) - set_work_tree(value); + string_ncopy(repo.worktree, value, valuelen); else if (!strcmp(name, "core.abbrev")) parse_int(&opt_id_width, value, 0, SIZEOF_REV - 1); diff --git a/test/diff/editor-test b/test/diff/editor-test index 61a99626e..108b36107 100755 --- a/test/diff/editor-test +++ b/test/diff/editor-test @@ -54,6 +54,82 @@ test_case default \ [diff] Changes to 'project/build.sbt' - line 224 of 367 61% EOF +test_case sub-directory \ + --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ + --before='mkdir -p some/subdir && cd some/subdir' \ + --script="$script" < + | AuthorDate: Sat Mar 1 17:26:01 2014 -0500 + 5| Commit: Jonas Fonseca + | CommitDate: Sat Mar 1 17:26:01 2014 -0500 + | + | WIP: Upgrade to 0.4-SNAPSHOT and DCE + | --- + 10| common/benchmark-runner.sh | 5 +++-- + | common/src/main/scala/org/scalajs/benchmark/Benchmark.scala | 11 +++++---- + | .../src/main/scala/org/scalajs/benchmark/BenchmarkApp.scala | 2 +- + | common/start-benchmark.js | 9 +++++++-- + | deltablue/exports.js | 13 --------- + 15| .../scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala | 7 +++++++ + | project/Build.scala | 13 ++++----- + | project/build.sbt | 5 ++++- + | richards/exports.js | 13 --------- + | .../scala/org/scalajs/benchmark/richards/Richards.scala | 3 +++ + 20| run.sh | 2 +- + | sudoku/exports.js | 13 --------- + | .../main/scala/org/scalajs/benchmark/sudoku/Sudoku.scala | 2 ++ + | tracer/exports.js | 13 --------- + | tracer/index-dev.html | 2 +- + 25| tracer/index.html | 2 +- + | .../main/scala/org/scalajs/benchmark/tracer/Tracer.scala | 3 +++ + | 17 files changed, 42 insertions(+), 76 deletions(-) + | +[diff] Press '' to jump to file diff - line 25 of 367 7% +EOF + # This settings doesn't seem to apply to `git-show` test_case mnemonic \ --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ @@ -217,6 +293,22 @@ assert_equals 'editor.log' < +' + +setup_submodule_project() +{ + create_repo_from_tgz "$base_dir/files/repo-two.tgz" + git submodule update + mkdir -p repo-two-a/src/subdir +} + +test_exec_work_dir setup_submodule_project +work_dir="$work_dir/repo-two-a/src/subdir" + +test_tig show 8cc26dd6e80e2fa7fa98d12f4670d8983bc83678 + +assert_equals 'diff.screen' < + | AuthorDate: Thu Jun 4 16:19:40 2009 +0000 + | Commit: Committer + 5| CommitDate: Thu Jun 4 16:19:40 2009 +0000 + | + | [repo-two-a] Commit 3 + | --- + | include/api.h | 1 + + 10| 1 file changed, 1 insertion(+) + | + | diff --git a/include/api.h b/include/api.h + | index f2eb956..1da0f3f 100644 + | --- a/include/api.h + 15| +++ b/include/api.h + | @@ -1 +1,2 @@ + | include/api.h + | +include/api.h + + +[diff] Press '' to jump to file diff - line 9 of 18 100% +EOF + +# The file is called include/api.h and contains its name on two lines +assert_equals 'editor.log' < + | AuthorDate: Sat Mar 1 17:26:01 2014 -0500 + 5| Commit: Jonas Fonseca + | CommitDate: Sat Mar 1 17:26:01 2014 -0500 + | + | WIP: Upgrade to 0.4-SNAPSHOT and DCE + | --- + 10| common/benchmark-runner.sh | 5 +++-- + | common/src/main/scala/org/scalajs/benchmark/Benchmark.scala | 11 +++++---- + | .../src/main/scala/org/scalajs/benchmark/BenchmarkApp.scala | 2 +- + | common/start-benchmark.js | 9 +++++++-- + | deltablue/exports.js | 13 --------- + 15| .../scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala | 7 +++++++ + | project/Build.scala | 13 ++++----- + | project/build.sbt | 5 ++++- + | richards/exports.js | 13 --------- + | .../scala/org/scalajs/benchmark/richards/Richards.scala | 3 +++ + 20| run.sh | 2 +- + | sudoku/exports.js | 13 --------- + | .../main/scala/org/scalajs/benchmark/sudoku/Sudoku.scala | 2 ++ + | tracer/exports.js | 13 --------- + | tracer/index-dev.html | 2 +- + 25| tracer/index.html | 2 +- + | .../main/scala/org/scalajs/benchmark/tracer/Tracer.scala | 3 +++ + | 17 files changed, 42 insertions(+), 76 deletions(-) + | +[diff] Press '' to jump to file diff - line 26 of 367 7% +EOF + +# This settings doesn't seem to apply to `git-show` +test_case mnemonic \ + --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ + --before='git config diff.mnemonicPrefix true' \ + --after='git config diff.mnemonicPrefix false' \ + --script="$script" << EOF + | - ) + | - + | lazy val parent: Project = Project( +200| id = "parent", + | base = file("."), + | @@ -53,10 +48,10 @@ object ScalaJSBenchmarks extends Build { + | ) + | +205| lazy val common = project("Common", defaultSettings) + | - lazy val deltablue = project("DeltaBlue", benchmarkSettings).dependsOn(c + | - lazy val richards = project("Richards", benchmarkSettings).dependsOn(com + | - lazy val sudoku = project("Sudoku", benchmarkSettings).dependsOn(common) + | - lazy val tracer = project("Tracer", benchmarkSettings).dependsOn(common) +210| + lazy val deltablue = project("DeltaBlue", defaultSettings).dependsOn(com + | + lazy val richards = project("Richards", defaultSettings).dependsOn(commo + | + lazy val sudoku = project("Sudoku", defaultSettings).dependsOn(common) + | + lazy val tracer = project("Tracer", defaultSettings).dependsOn(common) + | +215| def project(id: String, settings: Seq[sbt.Def.Setting[_]]) = Project( + | id = id.toLowerCase, + | diff --git a/project/build.sbt b/project/build.sbt + | index 87c2e66..122abd0 100644 + | --- a/project/build.sbt +220| +++ b/project/build.sbt + | @@ -1 +1,4 @@ + | -addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0. + | +resolvers += Resolver.url("scala-js-snapshots", + | + url("http://repo.scala-js.org/repo/snapshots/"))(Resolver.ivyStylePatt +[diff] Changes to 'project/build.sbt' - line 224 of 367 61% +EOF + +test_case noprefix \ + --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ + --before='git config diff.noprefix true' \ + --after='git config diff.noprefix false' \ + --script="$script" << EOF + | - ) + | - + | lazy val parent: Project = Project( +200| id = "parent", + | base = file("."), + | @@ -53,10 +48,10 @@ object ScalaJSBenchmarks extends Build { + | ) + | +205| lazy val common = project("Common", defaultSettings) + | - lazy val deltablue = project("DeltaBlue", benchmarkSettings).dependsOn(c + | - lazy val richards = project("Richards", benchmarkSettings).dependsOn(com + | - lazy val sudoku = project("Sudoku", benchmarkSettings).dependsOn(common) + | - lazy val tracer = project("Tracer", benchmarkSettings).dependsOn(common) +210| + lazy val deltablue = project("DeltaBlue", defaultSettings).dependsOn(com + | + lazy val richards = project("Richards", defaultSettings).dependsOn(commo + | + lazy val sudoku = project("Sudoku", defaultSettings).dependsOn(common) + | + lazy val tracer = project("Tracer", defaultSettings).dependsOn(common) + | +215| def project(id: String, settings: Seq[sbt.Def.Setting[_]]) = Project( + | id = id.toLowerCase, + | diff --git project/build.sbt project/build.sbt + | index 87c2e66..122abd0 100644 + | --- project/build.sbt +220| +++ project/build.sbt + | @@ -1 +1,4 @@ + | -addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0. + | +resolvers += Resolver.url("scala-js-snapshots", + | + url("http://repo.scala-js.org/repo/snapshots/"))(Resolver.ivyStylePatt +[diff] Changes to 'project/build.sbt' - line 224 of 367 61% +EOF + +test_case default-conflict \ + --before='setup-conflict.sh > config.setup' \ + --script=' + :view-diff + :7 + :edit + + :10 + :exec !vim +%(lineno) %(file) +' << EOF + 1| diff --cc conflict-file + | index 86c5a05,b4c3de6..0000000 + | --- a/conflict-file + | +++ b/conflict-file + 5| @@@ -1,1 -1,1 +1,5 @@@ + | ++<<<<<<< HEAD + | +c' + | ++======= + | + d' + 10| ++>>>>>>> conflict-branch + + + + + + + + + + + + + + + + + + +[stage] Unstaged changes to 'conflict-file' - line 10 of 10 100% +EOF + +test_case noprefix-conflict \ + --before='git config diff.noprefix true' \ + --after='git config diff.noprefix false' \ + --script=' + :view-diff + :7 + :edit + + :10 + :exec !vim +%(lineno) %(file) +' << EOF + 1| diff --cc conflict-file + | index 86c5a05,b4c3de6..0000000 + | --- a/conflict-file + | +++ b/conflict-file + 5| @@@ -1,1 -1,1 +1,5 @@@ + | ++<<<<<<< HEAD + | +c' + | ++======= + | + d' + 10| ++>>>>>>> conflict-branch + + + + + + + + + + + + + + + + + + +[stage] Unstaged changes to 'conflict-file' - line 10 of 10 100% +EOF + +run_test_cases + +assert_equals 'editor.log' <>>>>>> conflict-branch ++2 conflict-file +c' ++5 conflict-file +>>>>>>> conflict-branch +EOF + +assert_equals 'exec-env' < + | AuthorDate: Sat Mar 1 17:26:01 2014 -0500 + 5| Commit: Jonas Fonseca + | CommitDate: Sat Mar 1 17:26:01 2014 -0500 + | + | WIP: Upgrade to 0.4-SNAPSHOT and DCE + | --- + 10| common/benchmark-runner.sh | 5 +++-- + | common/src/main/scala/org/scalajs/benchmark/Benchmark.scala | 11 +++++---- + | .../src/main/scala/org/scalajs/benchmark/BenchmarkApp.scala | 2 +- + | common/start-benchmark.js | 9 +++++++-- + | deltablue/exports.js | 13 --------- + 15| .../scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala | 7 +++++++ + | project/Build.scala | 13 ++++----- + | project/build.sbt | 5 ++++- + | richards/exports.js | 13 --------- + | .../scala/org/scalajs/benchmark/richards/Richards.scala | 3 +++ + 20| run.sh | 2 +- + | sudoku/exports.js | 13 --------- + | .../main/scala/org/scalajs/benchmark/sudoku/Sudoku.scala | 2 ++ + | tracer/exports.js | 13 --------- + | tracer/index-dev.html | 2 +- + 25| tracer/index.html | 2 +- + | .../main/scala/org/scalajs/benchmark/tracer/Tracer.scala | 3 +++ + | 17 files changed, 42 insertions(+), 76 deletions(-) + | +[diff] Press '' to jump to file diff - line 26 of 367 7% +EOF + +# This settings doesn't seem to apply to `git-show` +test_case mnemonic \ + --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ + --before='git config diff.mnemonicPrefix true' \ + --after='git config diff.mnemonicPrefix false' \ + --script="$script" << EOF + | - ) + | - + | lazy val parent: Project = Project( +200| id = "parent", + | base = file("."), + | @@ -53,10 +48,10 @@ object ScalaJSBenchmarks extends Build { + | ) + | +205| lazy val common = project("Common", defaultSettings) + | - lazy val deltablue = project("DeltaBlue", benchmarkSettings).dependsOn(c + | - lazy val richards = project("Richards", benchmarkSettings).dependsOn(com + | - lazy val sudoku = project("Sudoku", benchmarkSettings).dependsOn(common) + | - lazy val tracer = project("Tracer", benchmarkSettings).dependsOn(common) +210| + lazy val deltablue = project("DeltaBlue", defaultSettings).dependsOn(com + | + lazy val richards = project("Richards", defaultSettings).dependsOn(commo + | + lazy val sudoku = project("Sudoku", defaultSettings).dependsOn(common) + | + lazy val tracer = project("Tracer", defaultSettings).dependsOn(common) + | +215| def project(id: String, settings: Seq[sbt.Def.Setting[_]]) = Project( + | id = id.toLowerCase, + | diff --git a/project/build.sbt b/project/build.sbt + | index 87c2e66..122abd0 100644 + | --- a/project/build.sbt +220| +++ b/project/build.sbt + | @@ -1 +1,4 @@ + | -addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0. + | +resolvers += Resolver.url("scala-js-snapshots", + | + url("http://repo.scala-js.org/repo/snapshots/"))(Resolver.ivyStylePatt +[diff] Changes to 'project/build.sbt' - line 224 of 367 61% +EOF + +test_case noprefix \ + --args='show ee912870202200a0b9cf4fd86ba57243212d341e' \ + --before='git config diff.noprefix true' \ + --after='git config diff.noprefix false' \ + --script="$script" << EOF + | - ) + | - + | lazy val parent: Project = Project( +200| id = "parent", + | base = file("."), + | @@ -53,10 +48,10 @@ object ScalaJSBenchmarks extends Build { + | ) + | +205| lazy val common = project("Common", defaultSettings) + | - lazy val deltablue = project("DeltaBlue", benchmarkSettings).dependsOn(c + | - lazy val richards = project("Richards", benchmarkSettings).dependsOn(com + | - lazy val sudoku = project("Sudoku", benchmarkSettings).dependsOn(common) + | - lazy val tracer = project("Tracer", benchmarkSettings).dependsOn(common) +210| + lazy val deltablue = project("DeltaBlue", defaultSettings).dependsOn(com + | + lazy val richards = project("Richards", defaultSettings).dependsOn(commo + | + lazy val sudoku = project("Sudoku", defaultSettings).dependsOn(common) + | + lazy val tracer = project("Tracer", defaultSettings).dependsOn(common) + | +215| def project(id: String, settings: Seq[sbt.Def.Setting[_]]) = Project( + | id = id.toLowerCase, + | diff --git project/build.sbt project/build.sbt + | index 87c2e66..122abd0 100644 + | --- project/build.sbt +220| +++ project/build.sbt + | @@ -1 +1,4 @@ + | -addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0. + | +resolvers += Resolver.url("scala-js-snapshots", + | + url("http://repo.scala-js.org/repo/snapshots/"))(Resolver.ivyStylePatt +[diff] Changes to 'project/build.sbt' - line 224 of 367 61% +EOF + +test_case default-conflict \ + --before='setup-conflict.sh > config.setup' \ + --script=' + :view-diff + :7 + :edit + + :10 + :exec !vim +%(lineno) %(file) +' << EOF + 1| diff --cc conflict-file + | index 86c5a05,b4c3de6..0000000 + | --- a/conflict-file + | +++ b/conflict-file + 5| @@@ -1,1 -1,1 +1,5 @@@ + | ++<<<<<<< HEAD + | +c' + | ++======= + | + d' + 10| ++>>>>>>> conflict-branch + + + + + + + + + + + + + + + + + + +[stage] Unstaged changes to 'conflict-file' - line 10 of 10 100% +EOF + +test_case noprefix-conflict \ + --before='git config diff.noprefix true' \ + --after='git config diff.noprefix false' \ + --script=' + :view-diff + :7 + :edit + + :10 + :exec !vim +%(lineno) %(file) +' << EOF + 1| diff --cc conflict-file + | index 86c5a05,b4c3de6..0000000 + | --- a/conflict-file + | +++ b/conflict-file + 5| @@@ -1,1 -1,1 +1,5 @@@ + | ++<<<<<<< HEAD + | +c' + | ++======= + | + d' + 10| ++>>>>>>> conflict-branch + + + + + + + + + + + + + + + + + + +[stage] Unstaged changes to 'conflict-file' - line 10 of 10 100% +EOF + +run_test_cases + +assert_equals 'editor.log' <>>>>>> conflict-branch ++2 conflict-file +c' ++5 conflict-file +>>>>>>> conflict-branch +EOF + +assert_equals 'exec-env' <> bench/README.md +} + +test_exec_work_dir setup_submodule_project +work_dir="$work_dir/bench/common/src" + +test_tig status + +assert_vars 1 + +assert_equals 'status.screen' <> "$output_dir/$work_dir/README.md" +} + +test_exec_work_dir setup_worktree_project +work_dir="$work_dir/common/src" + +test_tig status + +assert_vars 1 + +assert_equals 'status.screen' <> "$HOME/editor.log" @@ -486,7 +488,8 @@ test_require() test_exec_work_dir() { - printf '=== %s ===\n' "$*" >> "$HOME/test-exec.log" + cmd="$@" + printf '=== %s ===\n' "$cmd" >> "$HOME/test-exec.log" test_exec_log="$HOME/test-exec.log.tmp" rm -f -- "$test_exec_log" @@ -497,7 +500,6 @@ test_exec_work_dir() cat < "$test_exec_log" >> "$HOME/test-exec.log" if [ "$test_exec_exit_code" != 0 ]; then - cmd="$*" printf "[FAIL] unexpected exit code while executing '%s': %s\n" "$cmd" "$test_exec_exit_code" >> .test-result cat < "$test_exec_log" >> .test-result # Exit gracefully to allow additional tests to run @@ -680,6 +682,7 @@ run_test_cases() fi test_setup while read -r name <&3; do + export TEST_CASE="$name" if [ -n "$filter" ]; then matcher="$name" _filter_case_part="${filter#*:}" diff --git a/test/tree/submodule-editor-test b/test/tree/submodule-editor-test new file mode 100755 index 000000000..ff49e5951 --- /dev/null +++ b/test/tree/submodule-editor-test @@ -0,0 +1,112 @@ +#!/bin/sh + +. libtest.sh +. libgit.sh + +export LINES=14 + +executable exec-env < +' + +setup_submodule_project() +{ + mkdir -p "$output_dir/base" + cd "$output_dir/base" + create_repo_from_tgz "$base_dir/files/scala-js-benchmarks.tgz" + cd "$output_dir" + git_init + cd "$output_dir/$work_dir" + git submodule add "$output_dir/base" bench + git_commit -m "Adding benchmark" +} + +test_exec_work_dir setup_submodule_project +work_dir="$work_dir/bench/common/src" + +in_work_dir exec-env start +test_tig + +assert_vars 1 + +assert_equals 'bench-common-src.screen' < +' + +setup_worktree_project() +{ + mkdir -p "$output_dir/base" + cd "$output_dir/base" + create_repo_from_tgz "$base_dir/files/scala-js-benchmarks.tgz" + git branch work-branch ee912870202200a0b9cf4fd86ba57243212d341e + git worktree add "$output_dir/$work_dir" work-branch +} + +test_exec_work_dir setup_worktree_project +work_dir="$work_dir/common/src" + +in_work_dir exec-env start +test_tig + +assert_vars 1 + +assert_equals 'bench-common-src.screen' <