Skip to content

Commit c8e5bef

Browse files
committed
git p4 clone --bare: need to be explicit about the gitdir
When `safe.bareRepository` will change to be safe by default, bare repositories won't be discovered by default anymore. To prepare for this, `git p4` must be explicit about the gitdir when cloning into a bare repository, and no longer rely on that implicit discovery. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1f1668a commit c8e5bef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-p4.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4360,6 +4360,7 @@ def run(self, args):
43604360
init_cmd = ["git", "init"]
43614361
if self.cloneBare:
43624362
init_cmd.append("--bare")
4363+
os.environ["GIT_DIR"] = os.getcwd()
43634364
retcode = subprocess.call(init_cmd)
43644365
if retcode:
43654366
raise subprocess.CalledProcessError(retcode, init_cmd)

0 commit comments

Comments
 (0)