A hundred years ago I added this code because a "standalone" ref parsing code was not available from refs.c and the file was going through some heavy changes that refactoring its ref parsing code out was not an option. I promised to kill this parse_ref() eventually. I'm fulfilling it today (or soon). I would really like to you double check the approach I'm using here (using submodule interface for accessing refs from another worktree) since that may be the way forward to fix the "gc losing objects" in multi worktrees. I've given it lots of thoughts in the last 24 hours. Still can't find any fundamental flaw... Nguyễn Thái Ngọc Duy (2): refs.c: add resolve_ref_submodule() worktree.c: use submodule interface to access refs from another worktree branch.c | 3 +- refs.c | 20 +++++++++---- refs.h | 3 ++ worktree.c | 99 +++++++++++++++----------------------------------------------- worktree.h | 2 +- 5 files changed, 44 insertions(+), 83 deletions(-) -- 2.11.0.157.gd943d85