Skip to content
  • Duy Nguyen's avatar
    revision.c: --reflog add HEAD reflog from all worktrees · acd9544a
    Duy Nguyen authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Note that add_other_reflogs_to_pending() is a bit inefficient, since
    it scans reflog for all refs of each worktree, including shared refs,
    so the shared ref's reflog is scanned over and over again.
    
    We could update refs API to pass "per-worktree only" flag to avoid
    that. But long term we should be able to obtain a "per-worktree only"
    ref store and would need to revert the changes in reflog iteration
    API. So let's just wait until then.
    
    add_reflogs_to_pending() is called by reachable.c so by default "git
    prune" will examine reflog from all worktrees.
    
    Signed-off-by: default avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    acd9544a