Skip to content

nd/setup part two, second round

Nguyễn Thái Ngọc Duy git 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest19 patches 0 repliesNew
  2. v116 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19Move enter_repo() to setup.cpath.c setup.c+91 -910 replies
2/19enter_repo(): initialize other variables as setup_git_directory_gently() doessetup.c+7 -10 replies
3/19rev-parse --git-dir: print relative gitdir correctlybuiltin/rev-parse.c+8 -00 replies
4/19worktree setup: call set_git_dir explicitlysetup.c+8 -30 replies
5/19Add git_config_early()cache.h config.c+15 -50 replies
6/19Use git_config_early() instead of git_config() during repo setupsetup.c+22 -80 replies
7/19worktree setup: restore original state when things go wrongcache.h setup.c+43 -40 replies
8/19init/clone: turn on startup->have_repository properlybuiltin/clone.c builtin/init-db.c cache.h+7 -70 replies
9/19git_config(): do not read .git/config if there is no repositoryconfig.c t/t1300-repo-config.sh+15 -10 replies
10/19Do not read .git/info/exclude if there is no repositorydir.c t/t7002-grep.sh+29 -30 replies
11/19Do not read .git/info/attributes if there is no repositoryattr.c+4 -10 replies
12/19apply: do not check sha1 when repository has not been foundbuiltin/apply.c+1 -10 replies
13/19config: do not read .git/config if there is no repositorybuiltin/config.c t/t1300-repo-config.sh t/t1302-repo-version.sh+9 -50 replies
14/19run_builtin(): save "-h" detection result for later usecache.h git.c+5 -40 replies
15/19builtins: utilize startup_info->help where possiblebuiltin/check-ref-format.c builtin/grep.c builtin/index-pack.c +4 more+8 -110 replies
16/19builtins: check for startup_info->help, print and exit earlybuiltin/branch.c builtin/checkout-index.c builtin/commit.c +5 more+28 -30 replies
17/19Allow to undo setup_git_directory_gently() gracefully (and fix alias code)cache.h environment.c git.c +1 more+28 -60 replies
18/19alias: keep repository found while collecting aliases as long as possiblegit.c+10 -50 replies
19/19Guard unallowed access to repository when it's not set upbuiltin/init-db.c cache.h config.c +3 more+31 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/19] nd/setup part two, second round

Again, this series is to make repository setup more predictable, i.e. must be done in either setup_git_dir*, enter_repo or init_db. Compared to the first version [1]:

- More detail in commit messages, mostly extracted from [2]
- Fix "git foo -h" code path (that skips repo setup) in patches 14-16

[1] http://mid.gmane.org/[email protected]
[2] http://mid.gmane.org/[email protected]

Nguyễn Thái Ngọc Duy (19):
Move enter_repo() to setup.c
enter_repo(): initialize other variables as setup_git_directory_gently() does rev-parse --git-dir: print relative gitdir correctly
worktree setup: call set_git_dir explicitly
Add git_config_early()
Use git_config_early() instead of git_config() during repo setup worktree setup: restore original state when things go wrong init/clone: turn on startup->have_repository properly git_config(): do not read .git/config if there is no repository Do not read .git/info/exclude if there is no repository
Do not read .git/info/attributes if there is no repository
apply: do not check sha1 when repository has not been found
config: do not read .git/config if there is no repository run_builtin(): save "-h" detection result for later use
builtins: utilize startup_info->help where possible
builtins: check for startup_info->help, print and exit early Allow to undo setup_git_directory_gently() gracefully (and fix alias code)
alias: keep repository found while collecting aliases as long as possible Guard unallowed access to repository when it's not set up

 attr.c                     |    5 +-
 builtin/apply.c            |    2 +-
 builtin/branch.c           |    3 +
 builtin/check-ref-format.c |    2 +-
 builtin/checkout-index.c   |    3 +
 builtin/clone.c            |    3 +-
 builtin/commit.c           |    6 ++
 builtin/config.c           |    9 ++-
 builtin/gc.c               |    3 +
 builtin/grep.c             |    2 +-
 builtin/index-pack.c       |    2 +-
 builtin/init-db.c          |   10 ++-
 builtin/log.c              |    7 +-
 builtin/ls-files.c         |    3 +
 builtin/merge-ours.c       |    2 +-
 builtin/merge.c            |    3 +
 builtin/pack-redundant.c   |    2 +-
 builtin/rev-parse.c        |    8 ++
 builtin/show-ref.c         |    2 +-
 builtin/update-index.c     |    3 +
 builtin/upload-archive.c   |    7 +-
 cache.h                    |    7 ++-
 config.c                   |   22 ++++-
 dir.c                      |    8 +-
 environment.c              |   33 +++++++-
 git.c                      |   33 +++++---
 path.c                     |   91 ---------------------
 setup.c                    |  191 +++++++++++++++++++++++++++++++++++++++++---
 t/t1300-repo-config.sh     |   14 +++
 t/t1302-repo-version.sh    |    2 +-
 t/t7002-grep.sh            |   24 ++++++
 31 files changed, 360 insertions(+), 152 deletions(-)