topgit icon indicating copy to clipboard operation
topgit copied to clipboard

TopGit doesn't work in a linked git worktree

Open greenrd opened this issue 8 years ago • 1 comments

/usr/bin/tg: line 118: /home/robin/git/foo/.git/worktrees/foo.2/hooks/pre-commit+: No such file or directory
chmod: cannot access '/home/robin/git/foo/.git/worktrees/foo.2/hooks/pre-commit+': No such file or directory

greenrd avatar Nov 04 '16 16:11 greenrd

Workaround: add

    if [ -f ".git" ]; then
        return
    fi

to the start of setup_hook in tg.sh.

greenrd avatar Nov 04 '16 16:11 greenrd