[PATCH 00/42] repo setup test cases and fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I hope this is the last time setup_* functions need to be fixed. There
is still room for improvement though. Two comes to mind are:

 - warn users when GIT_WORK_TREE/core.worktree/core.bare is set but
   ignored
 - turn absolute path to relative where possible

This series includes setup coverage tests (180/376 fail). Then the fixes,
which bring down to zero failed test in the end. 02/42 describes the
rules. New rules are:

 - GIT_WORK_TREE is relative to user's cwd. This is how the code works
   until now (which also makes sense to me).

 - core.worktree won't override core.bare.

Documents may need updates. I'll do that later.


Nguyán ThÃi Ngác Duy (42):
  builtins: print setup info if repo is found
  Add t1510 and basic rules that run repo setup
  t1510: setup case #0
  t1510: setup case #1
  t1510: setup case #2
  t1510: setup case #3
  t1510: setup case #4
  t1510: setup case #5
  t1510: setup case #6
  t1510: setup case #7
  t1510: setup case #8
  t1510: setup case #9
  t1510: setup case #10
  t1510: setup case #11
  t1510: setup case #12
  t1510: setup case #13
  t1510: setup case #14
  t1510: setup case #15
  t1510: setup case #16
  t1510: setup case #17
  t1510: setup case #18
  t1510: setup case #19
  t1510: setup case #20
  t1510: setup case #21
  t1510: setup case #22
  t1510: setup case #23
  t1510: setup case #24
  t1510: setup case #25
  t1510: setup case #26
  t1510: setup case #27
  t1510: setup case #28
  t1510: setup case #29
  t1510: setup case #30
  t1510: setup case #31

Tests


  rev-parse: prints --git-dir relative to user's cwd

Indepdent fix, but is needed after setup_* rework because the new code
will set relative git_dir.


  Add git_config_early()
  Use git_config_early() instead of git_config() during repo setup

Cherry-picked from my old tp/setup series, needed to be able to check
core.{bare,worktree} early.


  Remove all logic from get_git_work_tree()

Break it some more.


  setup: clean up setup_bare_git_dir()
  setup: clean up setup_discovered_git_dir()
  setup: rework setup_explicit_git_dir()

setup_* rework.

  t1510: all failed tests are now fixed

All tests are passed.


 builtin/init-db.c     |   13 +-
 builtin/rev-parse.c   |    6 +-
 cache.h               |    2 +
 config.c              |   19 +-
 environment.c         |   21 +-
 git.c                 |    4 +
 setup.c               |  227 ++-
 t/t1510-repo-setup.sh | 4515 +++++++++++++++++++++++++++++++++++++++++++++++++
 trace.c               |   42 +
 9 files changed, 4733 insertions(+), 116 deletions(-)
 create mode 100755 t/t1510-repo-setup.sh

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]