From cf29ed121d9d0dc73370be7c0081ec31ce3faf0e Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 20 Mar 2023 17:44:27 -0500 Subject: [PATCH] patchinstall.py: Use --git-dir instead of -C. This reportedly works better for nested git trees. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51877 --- staging/patchinstall.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/staging/patchinstall.py b/staging/patchinstall.py index fea10b79..00d8d39a 100755 --- a/staging/patchinstall.py +++ b/staging/patchinstall.py @@ -76,16 +76,17 @@ def parse_def_file(name, path): return deps def apply_patch(patch): + gitdir = os.path.join(winedir,'.git') if backend == 'git-am': - return run(['git','-C',winedir,'am',patch]) + return run(['git','--git-dir',gitdir,'am',patch]) elif backend == 'git-am-C1': - return run(['git','-C',winedir,'am','-C1',patch]) + return run(['git','--git-dir',gitdir,'am','-C1',patch]) elif backend == 'patch': with open(patch) as f: print(patchdir+'/gitapply.sh -d', winedir, '<', patch) return subprocess.call([patchdir+'/gitapply.sh','-d',winedir],stdin=f) elif backend == 'git-apply': - return run(['git','-C',winedir,'apply','--index',patch]) + return run(['git','--git-dir',gitdir,'apply','--index',patch]) def run_autoconf(patch): if not force_autoconf: return @@ -107,7 +108,8 @@ def run_autoconf(patch): if need_make_requests: run(['./tools/make_requests'], cwd=winedir) if need_autoreconf or need_make_requests: - run(['git','-C',winedir,'commit','-a','--amend','--no-edit']) + gitdir = os.path.join(winedir,'.git') + run(['git','--git-dir',gitdir,'commit','-a','--amend','--no-edit']) def add_patch_data(patch): global patch_data