• N
    revision.c: --all adds HEAD from all worktrees · d0c39a49
    Nguyễn Thái Ngọc Duy 提交于
    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: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    d0c39a49
t5304-prune.sh 7.8 KB