[PATCH v2 0/6] Kill the_repository in tree-walk.c

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

 



v2 fixes t7814 flakiness. The problem is git-grep can operate on
multiple repos and I read objects from the wrong repo (supermodule)
instead of the submodule one.

There are still the_repository hidden in git-grep code paths, and the
hack of asborbing submodule's object db to the_repo's in order to make
it work.  And I can't quite understand how t7814 sometimes passed.

I'll revisit this after this series is done and will try to get rid of
add_to_alternates_memory() in git-grep.

Nguyễn Thái Ngọc Duy (6):
  sha1-file.c: remove the_repo from read_object_with_reference()
  tree-walk.c: remove the_repo from fill_tree_descriptor()
  tree-walk.c: remove the_repo from get_tree_entry()
  tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()
  match-trees.c: remove the_repo from shift_tree*()
  Use the right 'struct repository' instead of the_repository

 archive.c                   |  4 +++-
 blame.c                     |  4 ++--
 builtin/cat-file.c          |  3 ++-
 builtin/grep.c              |  6 ++++--
 builtin/merge-tree.c        | 22 +++++++++++--------
 builtin/pack-objects.c      |  3 ++-
 builtin/rebase.c            |  4 ++--
 builtin/reset.c             |  4 ++--
 builtin/rm.c                |  2 +-
 builtin/update-index.c      |  2 +-
 cache.h                     |  7 +++---
 fast-import.c               |  9 +++++---
 line-log.c                  |  7 +++---
 match-trees.c               | 12 ++++++-----
 merge-recursive.c           | 43 +++++++++++++++++++++----------------
 notes.c                     |  4 ++--
 sequencer.c                 |  6 +++---
 sha1-file.c                 |  5 +++--
 sha1-name.c                 | 25 +++++++--------------
 shallow.c                   |  3 ++-
 t/helper/test-match-trees.c |  2 +-
 tree-diff.c                 |  4 ++--
 tree-walk.c                 | 35 ++++++++++++++++++++----------
 tree-walk.h                 |  8 ++++---
 unpack-trees.c              |  2 +-
 25 files changed, 129 insertions(+), 97 deletions(-)

Range-diff dựa trên v1:
1:  35d7cdbe6a ! 1:  9e73c39f9a sha1-file.c: remove the_repo from read_object_with_reference()
    @@ -3,7 +3,6 @@
         sha1-file.c: remove the_repo from read_object_with_reference()
     
         Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
    -    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
     
      diff --git a/builtin/cat-file.c b/builtin/cat-file.c
      --- a/builtin/cat-file.c
    @@ -27,7 +26,7 @@
      
      		grep_read_lock();
     -		data = read_object_with_reference(&object->oid, tree_type,
    -+		data = read_object_with_reference(opt->repo,
    ++		data = read_object_with_reference(&subrepo,
     +						  &object->oid, tree_type,
      						  &size, NULL);
      		grep_read_unlock();
2:  4ff146fb64 = 2:  b9107f7503 tree-walk.c: remove the_repo from fill_tree_descriptor()
3:  47f956bd0f = 3:  87ed67bde5 tree-walk.c: remove the_repo from get_tree_entry()
4:  e19c4b9ce6 = 4:  557b61f2ba tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()
5:  3fe87a7fde = 5:  53f09e0437 match-trees.c: remove the_repo from shift_tree*()
6:  6d0449f1a7 = 6:  d5d4d2ba65 Use the right 'struct repository' instead of the_repository
-- 
2.22.0.rc0.322.g2b0371e29a




[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