Re: [PATCH 3/3] doc/Makefile: drop doc-diff worktree and temporary files on "make clean"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 17, 2018 at 4:43 PM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux