• Duy Nguyen's avatar
    revision.c: better error reporting on ref from different worktrees · ab3e1f78
    Duy Nguyen authored
    Make use of the new ref aliases to pass refs from another worktree
    around and access them from the current ref store instead. This does
    not change any functionality, but when a problem arises, we would like
    the reported messages to mention full ref aliases, like this:
        fatal: bad object worktrees/ztemp/HEAD
        warning: reflog of 'main-worktree/HEAD' references pruned commits
    instead of
        fatal: bad object HEAD
        warning: reflog of 'HEAD' references pruned commits
    which does not really tell where the refs are from.
    Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
worktree.c 13.1 KB