Skip to content
  • Duy Nguyen's avatar
    Add a place for (not) sharing stuff between worktrees · 8aff1a9c
    Duy Nguyen authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When multiple worktrees are used, we need rules to determine if
    something belongs to one worktree or all of them. Instead of keeping
    adding rules when new stuff comes (*), have a generic rule:
    
    - Inside $GIT_DIR, which is per-worktree by default, add
      $GIT_DIR/common which is always shared. New features that want to
      share stuff should put stuff under this directory.
    
    - Inside refs/, which is shared by default except refs/bisect, add
      refs/worktree/ which is per-worktree. We may eventually move
      refs/bisect to this new location and remove the exception in refs
      code.
    
    (*) And it may also include stuff from external commands which will
        have no way to modify common/per-worktree rules.
    
    Signed-off-by: default avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    8aff1a9c