Skip to content

Commit 711a7dc

Browse files
committed
Get default branch name from the right git dir
1 parent 8dda20e commit 711a7dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.maintenance/refresh-repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
printf( "--- Refreshing repository \033[32m{$repository}\033[0m ---\n" );
1111

1212
printf( "Switching to latest \033[33mdefault\033[0m branch...\n" );
13-
system( "git --git-dir={$path}/.git --work-tree={$path} checkout $(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)" );
13+
system( "git --git-dir={$path}/.git --work-tree={$path} checkout $(git --git-dir={$path}/.git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)" );
1414

1515
printf( "Pulling latest changes...\n" );
1616
system( "git --git-dir={$path}/.git --work-tree={$path} pull" );

0 commit comments

Comments
 (0)