Skip to content

Commit c465088

Browse files
committed
pull-test.sh: avoid "git subtree pull" error
Without a prior `git reset --hard`, `git subtree pull` fails with: fatal: working tree has modifications. Cannot add. Debugging with -d doesn't show any explanation and neither `git diff` nor `git diff-index` show any modifications. The `git reset --hard` shouldn't be necessary.
1 parent f9d5b9c commit c465088

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pull-test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ CSI_RELEASE_TOOLS_DIR="$(pwd)"
2525

2626
# Update the other repo.
2727
cd "$PULL_TEST_REPO_DIR"
28+
git reset --hard # Shouldn't be necessary, but somehow is to avoid "fatal: working tree has modifications. Cannot add." (https://stackoverflow.com/questions/3623351/git-subtree-pull-says-that-the-working-tree-has-modifications-but-git-status-sa)
2829
git subtree pull --squash --prefix=release-tools "$CSI_RELEASE_TOOLS_DIR" master
2930
git log -n2
3031

0 commit comments

Comments
 (0)