ExternalProject: Remove extra quotes in for-each-ref update step

The --format=... argument to git for-each-ref was using a stray pair
of single quotes around the format string. These were then part of
the output, which caused it to never match the checkout_name.
The end result was that a REBASE_CHECKOUT always became a
CHECKOUT in all scenarios.

Fixes: #23216
This commit is contained in:
Craig Scott
2022-02-21 18:19:16 +11:00
parent 704e87ee8c
commit dec997f04e
+1 -1
View File
@@ -128,7 +128,7 @@ if(git_update_strategy MATCHES "^REBASE(_CHECKOUT)?$")
else()
execute_process(
COMMAND "@git_EXECUTABLE@" for-each-ref "--format='%(upstream:short)'" "${current_branch}"
COMMAND "@git_EXECUTABLE@" for-each-ref "--format=%(upstream:short)" "${current_branch}"
WORKING_DIRECTORY "@work_dir@"
OUTPUT_VARIABLE upstream_branch
OUTPUT_STRIP_TRAILING_WHITESPACE