Skip to content

Commit e3e4e2b

Browse files
authored
Merge pull request #186 from hashicorp/cherry-pick-ignore-added-files
cherry_pick.sh: unstage added ignored files
2 parents d52a6d3 + 4c85f93 commit e3e4e2b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scripts/cherry_pick/IGNORE_FILES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
^internal/httpclient/(testdata/.*|test-fixtures/.*|[^/]*)$
22
^internal/helper/encryption/(testdata/.*|test-fixtures/.*|[^/]*)$
3-
^internal/version/(testdata/.*|test-fixtures/.*|[^/]*)$
3+
^internal/version/(testdata/.*|test-fixtures/.*|[^/]*)$
4+
^website/.*$

scripts/cherry_pick/cherry_pick.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ git cherry-pick --no-commit --mainline 1 "$COMMIT_ID"
1818
echo "Unstaging files removed by us..."
1919
git status --short | sed -n 's/^DU //p' | ifne xargs git rm
2020

21+
echo "Unstaging added files that match the ignore list..."
22+
git status --short | sed -n 's/^A //p' | grep -Ef ./scripts/cherry_pick/IGNORE_FILES | ifne xargs git rm -f
23+
2124
echo "Unstaging files where SDK intentionally diverges from Core..."
2225
for f in $(git diff --name-only --cached | grep -Ef ./scripts/cherry_pick/IGNORE_FILES)
2326
do

0 commit comments

Comments
 (0)