sync: Avoid deleting files ignored by git during pipelines sync#3847
sync: Avoid deleting files ignored by git during pipelines sync#3847mashehu merged 13 commits intonf-core:devfrom
pipelines sync#3847Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7104b03 to
9aa835b
Compare
1954f31 to
ff72cf7
Compare
* functioning modifications and running tests * helper functions for git file retrieval * typos * easier to read git add syntax * small simplification * Updated docstrings * helper method for tests * Refactoring for clarity --------- Co-authored-by: Tatiana Gelaf Romer <[email protected]>
When some files are already globally ignored via .gitignore, git add --all will not add them even if we want to force add all files except some specific ones. Not using force will cause git to error out since the files with the exclude pattern are already ignored.
…files from being commited
fbd5b89 to
9d08715
Compare
pipelines syncpipelines sync
mirpedrol
left a comment
There was a problem hiding this comment.
Thanks for the contribution @tgelafr-pfzr, changes are looking good!
But we are moving to pathlib instead of os, could you please change the library used? For example using Path.walk() instead of os.walk(), avoiding os.path.join, etc.
@mirpedrol I modified as much as possible, Path.walk is only available in Python 3.12+ |
Avoid deleting files ignored by git during
pipelines sync.Follow up on this issue: #2146, but avoids committing previously ignored files after switching to the
TEMPLATEbranch by keeping record of them before checkout.PR checklist
CHANGELOG.mdis updated