• Duy Nguyen's avatar
    revision.c: --all adds HEAD from all worktrees · d0c39a49
    Duy Nguyen authored
    Unless single_worktree is set, --all now adds HEAD from all worktrees.
    Since reachable.c code does not use setup_revisions(), we need to call
    other_head_refs_submodule() explicitly there to have the same effect on
    "git prune", so that we won't accidentally delete objects needed by some
    other HEADs.
    A new FIXME is added because we would need something like
        int refs_other_head_refs(struct ref_store *, each_ref_fn, cb_data);
    in addition to other_head_refs() to handle it, which might require
        int get_submodule_worktrees(const char *submodule, int flags);
    It could be a separate topic to reduce the scope of this one.
    Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
reachable.c 4.82 KB