Fix git-worktree support
commit3448d1cd6a3a3bedd0668c6b6b60fd545a3614ed
authorJonas Fonseca <jonas.fonseca@gmail.com>
Wed, 9 Sep 2015 07:16:31 +0000 (9 09:16 +0200)
committerJonas Fonseca <jonas.fonseca@gmail.com>
Wed, 9 Sep 2015 07:20:07 +0000 (9 09:20 +0200)
treec355c94f28447cfc3a6d9249a21dd5a4298e1f35
parent65cb5b4242bffe5950402289119d75aa1ef1678a
Fix git-worktree support

Use git-show-ref instead of git-ls-remote to properly list references in
worktrees. The latter was failing with:

    $ git ls-remote /opt/tig/test/tmp/status/worktree-test/repo/.git/worktrees/work dir
    fatal: '/opt/tig/test/tmp/status/worktree-test/repo/.git/worktrees/work dir' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists

Initial test case provided by stenja.

Fixes #437
NEWS.adoc
src/refdb.c
test/refs/worktree-test [new file with mode: 0755]
test/status/worktree-test [new file with mode: 0755]
test/tools/libgit.sh