]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision.c: better error reporting on ref from different worktrees
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 21 Oct 2018 08:08:56 +0000 (10:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Oct 2018 04:32:29 +0000 (13:32 +0900)
commitab3e1f78ae8ecb3371cf85a36d73fd341fad3884
treef3f00295b056fb346d5bbba0bcbe53ca7d3b6e3c
parent061e420a4d3a87ea331eb51f2b92b6b97f3115da
revision.c: better error reporting on ref from different worktrees

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: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
worktree.c
worktree.h