git-repo/tests
Mike Frysinger 2a089cfee4 project: migrate worktree .git/ dirs to symlinks
Historically we created a .git/ subdir in each source checkout and
symlinked individual files to the .repo/projects/ paths.  This layer
of indirection isn't actually needed: the .repo/projects/ paths are
guaranteed to only ever have a 1-to-1 mapping with the actual git
checkout.  So we don't need to worry about having files in .git/ be
isolated.

To that end, change how we manage the actual project checkouts from
a dir full of symlinks (and a few files) to a symlink to the internal
.repo/projects/ dir.  This makes the code simpler & faster.

The directory structure we have today is:
.repo/
  project-objects/chromiumos/third_party/kernel.git/
    <paths omitted as not relevant to this change>
  projects/src/third_party/kernel/
    v3.8.git/
      config
      description   -> …/project-objects/…/config
      FETCH_HEAD
      HEAD
      hooks/        -> …/project-objects/…/hooks/
      info/         -> …/project-objects/…/info/
      logs/
      objects/      -> …/project-objects/…/objects/
      packed-refs
      refs/
      rr-cache/     -> …/project-objects/…/rr-cache/
src/third_party/kernel/
  v3.8/
    .git/
      config        -> …/projects/…/v3.8.git/config
      description   -> …/project-objects/…/v3.8.git/description
      HEAD
      hooks/        -> …/project-objects/…/v3.8.git/hooks/
      index
      info/         -> …/project-objects/…/v3.8.git/info/
      logs/         -> …/projects/…/v3.8.git/logs/
      objects/      -> …/project-objects/…/v3.8.git/objects/
      packed-refs   -> …/projects/…/v3.8.git/packed-refs
      refs/         -> …/projects/…/v3.8.git/refs/
      rr-cache/     -> …/project-objects/…/v3.8.git/rr-cache/

The directory structure we have after this commit:
.repo/
  <nothing changes>
src/third_party/kernel/
  v3.8/
    .git            -> …/projects/…/v3.8.git

Bug: https://crbug.com/gerrit/15273
Change-Id: I9dd8def23fbfb2f4cb209a93f8b1b2b24002a444
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/323695
Reviewed-by: Mike Nichols <mikenichols@google.com>
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
2021-12-01 15:27:16 +00:00
..
fixtures git_config: Fixed test.gitconfig getting updated when running tests. 2021-09-30 21:45:09 +00:00
test_editor.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_error.py error: fix pickling of all exceptions 2021-02-19 20:06:03 +00:00
test_git_command.py ssh: move all ssh logic to a common place 2021-05-06 19:09:16 +00:00
test_git_config.py git_config: Fixed test.gitconfig getting updated when running tests. 2021-09-30 21:45:09 +00:00
test_git_superproject.py superproject: support a new revision attribute. 2021-09-27 06:36:05 +00:00
test_git_trace2_event_log.py trace2_event: Add remove_prefix to fix failing tests on Linux & macOS. 2021-09-29 21:24:59 +00:00
test_hooks.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_manifest_xml.py Add 'dest-path' to extend-project to support changing path 2021-09-28 20:12:00 +00:00
test_platform_utils.py make file removal a bit more robust 2021-09-28 16:06:50 +00:00
test_project.py project: migrate worktree .git/ dirs to symlinks 2021-12-01 15:27:16 +00:00
test_ssh.py ssh: rewrite proxy management for multiprocessing usage 2021-05-10 21:16:06 +00:00
test_subcmds_init.py tests: fix init subcmd after url change 2021-02-25 17:07:11 +00:00
test_subcmds.py subcmds: force consistent help text format 2021-05-04 16:40:53 +00:00
test_wrapper.py tests: fix duplicate method from copy & paste error 2021-03-04 16:17:11 +00:00