pick-ui: make .pick_status.json path relative to the git root instead of the script
This allows the script to be called from another git worktree for instance, which I need for my workflow :) Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4649>
This commit is contained in:
parent
26a26a3584
commit
32451a15ec
|
@ -25,6 +25,7 @@ import enum
|
|||
import json
|
||||
import pathlib
|
||||
import re
|
||||
import subprocess
|
||||
import typing
|
||||
|
||||
import attr
|
||||
|
@ -55,7 +56,9 @@ SEM = asyncio.Semaphore(50)
|
|||
|
||||
COMMIT_LOCK = asyncio.Lock()
|
||||
|
||||
pick_status_json = pathlib.Path(__file__).parent.parent.parent / '.pick_status.json'
|
||||
git_toplevel = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'],
|
||||
stderr=subprocess.DEVNULL).decode("ascii").strip()
|
||||
pick_status_json = pathlib.Path(git_toplevel) / '.pick_status.json'
|
||||
|
||||
|
||||
class PickUIException(Exception):
|
||||
|
|
Loading…
Reference in New Issue