From: Junio C Hamano Date: Thu, 7 Feb 2019 06:05:29 +0000 (-0800) Subject: Merge branch 'ma/doc-diff-usage-fix' X-Git-Tag: v2.21.0-rc0~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0b5dc59c6b5bea37a425f84e64cd33cd0694a46d?ds=inline;hp=-c Merge branch 'ma/doc-diff-usage-fix' Running "Documentation/doc-diff x" from anywhere other than the top-level of the working tree did not show the usage string correctly, which has been fixed. * ma/doc-diff-usage-fix: doc-diff: don't `cd_to_toplevel` --- 0b5dc59c6b5bea37a425f84e64cd33cd0694a46d diff --combined Documentation/doc-diff index dfd9418778,93fe1c791f..32c83dd26f --- a/Documentation/doc-diff +++ b/Documentation/doc-diff @@@ -39,8 -39,7 +39,7 @@@ d shift done - cd_to_toplevel - tmp=Documentation/tmp-doc-diff + tmp="$(git rev-parse --show-toplevel)/Documentation/tmp-doc-diff" || exit 1 if test -n "$clean" then @@@ -75,7 -74,7 +74,7 @@@ f # results that don't differ between the two trees. if ! test -d "$tmp/worktree" then - git worktree add --detach "$tmp/worktree" "$from" && + git worktree add -f --detach "$tmp/worktree" "$from" && dots=$(echo "$tmp/worktree" | sed 's#[^/]*#..#g') && ln -s "$dots/config.mak" "$tmp/worktree/config.mak" fi @@@ -109,7 -108,7 +108,7 @@@ render_tree () make -j$parallel -C "$tmp/worktree" \ GIT_VERSION=omitted \ SOURCE_DATE_EPOCH=0 \ - DESTDIR="$PWD/$tmp/installed/$1+" \ + DESTDIR="$tmp/installed/$1+" \ install-man && mv "$tmp/installed/$1+" "$tmp/installed/$1" fi &&