[PATCH 0/3] update delete_ref(), update_ref() and ref_exists() to take a struct repository

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

 



The code handling pseudo refs such as BISECT_HEAD or CHERRY_PICK_HEAD
assumes that they are files and uses unlink() and file_exists() on the
corresponding paths rather than using the ref api. In repositories using
reftable to store references this will not work. This patch series is a
preparatory step that updates some reference functions to take a struct
repository in preparation for converting code that handles pseudo refs to
the ref api. The conversion will be handled by a separate series

These patches could each be split in two (thereby making the individual
patches smaller) by changing the callers to pass the_repository first and
then changing the call chain to pass a struct repository around if desired.

This series is based on master - 101b3204f3 ("The third batch", 2020-06-17).
When merging into pu there are non-trivial conflicts with
jx/proc-receive-hook, dr/push-remoteref-fix and mr/bisect-in-c-2. I have
prepared a conflict resolution [1] I'm happy to rebase on top of a merge of
master and those three branches if that is helpful.

[1] tag merge-repo-refs-into-pu/v1 at https://github.com/phillipwood/git.git

Phillip Wood (3):
  refs: update delete_ref() to take a struct repository
  refs: update update_ref() to take a struct repository
  refs: update ref_exists() to take a struct repository

 bisect.c                 | 18 ++++++----
 branch.c                 | 14 ++++----
 branch.h                 |  6 ++--
 builtin/am.c             | 19 +++++-----
 builtin/bisect--helper.c |  8 ++---
 builtin/branch.c         | 23 ++++++------
 builtin/checkout.c       | 17 +++++----
 builtin/clone.c          | 16 ++++-----
 builtin/commit.c         |  4 +--
 builtin/for-each-ref.c   |  4 +--
 builtin/log.c            |  6 ++--
 builtin/ls-remote.c      |  2 +-
 builtin/merge.c          | 12 +++----
 builtin/notes.c          | 15 ++++----
 builtin/pull.c           |  5 +--
 builtin/rebase.c         | 10 +++---
 builtin/receive-pack.c   |  2 +-
 builtin/remote.c         | 11 +++---
 builtin/replace.c        |  2 +-
 builtin/reset.c          | 10 +++---
 builtin/revert.c         |  2 +-
 builtin/send-pack.c      |  3 +-
 builtin/stash.c          |  8 ++---
 builtin/symbolic-ref.c   |  3 +-
 builtin/tag.c            |  8 ++---
 builtin/update-ref.c     |  5 +--
 builtin/verify-tag.c     |  2 +-
 builtin/worktree.c       |  8 ++---
 diff.c                   |  2 +-
 fast-import.c            |  2 +-
 notes-cache.c            |  4 +--
 notes-cache.h            |  2 +-
 notes-utils.c            |  2 +-
 ref-filter.c             | 76 +++++++++++++++++++++++++---------------
 ref-filter.h             | 11 +++---
 refs.c                   | 14 ++++----
 refs.h                   |  6 ++--
 remote.c                 | 30 +++++++++-------
 remote.h                 | 13 ++++---
 reset.c                  |  8 ++---
 sequencer.c              | 41 +++++++++++-----------
 sequencer.h              |  2 +-
 sha1-name.c              |  5 +--
 transport-helper.c       | 32 +++++++++--------
 transport-internal.h     |  4 ++-
 transport.c              | 15 ++++----
 transport.h              |  3 +-
 wt-status.c              | 41 ++++++++++++----------
 wt-status.h              |  2 +-
 49 files changed, 314 insertions(+), 244 deletions(-)


base-commit: 101b3204f37606972b40fc17dec84560c22f69f6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-665%2Fphillipwood%2Fwip%2Frepo-refs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-665/phillipwood/wip/repo-refs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/665
-- 
gitgitgadget



[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]

  Powered by Linux