On Mon, Sep 17, 2018 at 4:43 PM Eric Sunshine <sunsh...@sunshineco.com> wrote:
> I did consider this case and felt that it would be reasonable for it
> to error out and ignore the error if git was missing or if the
> directory was not a repository. And, I _thought_ I had prefixed the
> line with "-" to handle just such a case, but apparently I botched it.
> Oh well.

Dredging up from memory, I think the omission of "-" from the Makefile
line was intentional since I specifically handled the case of missing
"git" command in the script itself by ignoring any error from it.
Specifically, this excerpt from doc-diff:

    if test -n "$clean"
    then
        test $# -eq 0 || usage
        git worktree remove --force "$tmp/worktree" 2>/dev/null
        rm -rf "$tmp"
        exit 0
    fi

in which a problem invoking git is explicitly ignored and the script
exits cleanly, so no Makefile "-" is needed.

Unfortunately, I forgot about the:

    . "$(git --exec-path)/git-sh-setup"

which happens earlier in the script.

Reply via email to