Open
Description
Using git worktree for different branches of ES is common. Running the docs build in a worktree (or perhaps just a folder not called elasticsearch) does not seem to work.
My setup is that I have a GIT_HOME with:
docs
elasticsearch (master)
elasticsearch-7.x (worktree)
elasticsearch-7.11 (worktree)
...
I can successfully run the docs build from the master git directory. But if I run it from any of my worktrees it fails:
cd $GIT_HOME/elasticsearch
git worktree add ../elasticsearch-7.x 7.x
cd $GIT_HOME/elasticsearch-7.x
$GIT_HOME/docs/build_docs --doc $GIT_HOME/elasticsearch-7.x/docs/reference/index.asciidoc --resource=$GIT_HOME/elasticsearch-7.x/x-pack/docs/ --chunk 1
INFO:build_docs:Building HTML from /doc/elasticsearch-7.x/docs/reference/index.asciidoc
INFO:build_docs:Couldn't find repo toplevel for /doc/elasticsearch-7.x/docs/reference
INFO:build_docs:Guessed toplevel=[/doc/elasticsearch-7.x/docs/reference] remote=[0] branch=[master] repo=[repo]
INFO:build_docs:Couldn't find repo toplevel for /doc/elasticsearch-7.x/x-pack/docs
INFO:build_docs:
INFO:build_docs:asciidoctor: ERROR: modules/cluster/misc.asciidoc: line 123: include file not found: /doc/elasticsearch-7.x/docs/reference/modules/cluster/{elasticsearch-root}/docs/reference/indices/dangling-indices-list.asciidoc
...
(lots of errors)
I can workaround this by checking out the branch in my master
elasticsearch
dir, but it is a bit inconvenient. Thus not urgent in any way.
It seems worktree support was added in #860.