Skip to content

Commit

Permalink
cvs2git: Protect committs on the HEAD of 'main' branch
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed May 17, 2021
1 parent 24cbf0c commit 1703252
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/cvs2git_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ echo SCRIPT_DIR $SCRIPT_DIR
pushd ${GIT_REPO_DIR}

echo -n "" > ${GIT_REPO_DIR}/blobs_to_keep.txt
# Add "main" branch to the list of protected references
TAGS_TO_PROTECT="main $(git tag -l ${TAGS_TO_PROTECT} | tr '\n' ' ')"

for tag in $(git tag -l ${TAGS_TO_PROTECT})
for tag in main ${TAGS_TO_PROTECT}
do
echo $tag
git ls-tree -r $tag | awk '{print $3}' >> ${GIT_REPO_DIR}/blobs_to_keep.txt
Expand Down

0 comments on commit 1703252

Please sign in to comment.