Skip to content

Commit 90fa2d4

Browse files
committed
git-import-srpm: Fix use of FORCE_IMPORT
When using 'FORCE_IMPORT=1', the 'git branch -D' command was not using the '-C ${CODE_REPO_PATH}' option. Signed-off-by: Thierry Escande <thierry.escande@vates.tech>
1 parent 90b5697 commit 90fa2d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/git-import-srpm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function init_worktrees() {
225225
if git -C "${CODE_REPO_PATH}" show-ref --verify --quiet "refs/heads/${BRANCH_NAME}"; then
226226
echo "[-] branch ${BRANCH_NAME} already exists"
227227
if [[ "${FORCE_IMPORT:-}" ]]; then
228-
git branch -D "${BRANCH_NAME}"
228+
git -C "${CODE_REPO_PATH}" branch -D "${BRANCH_NAME}"
229229
else
230230
exit 1
231231
fi

0 commit comments

Comments
 (0)