Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eas-cli] Do not include files deleted in working directory #2900

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

sjchmiela
Copy link
Contributor

@sjchmiela sjchmiela commented Feb 10, 2025

Why

When we git clone the source repository and then copy worktree changes over, we add and modify files. However, we do not delete files that have been deleted in worktree.

How

When we operate in requireCommit: false mode, we add --no-checkout to the git clone command. This way the destination directory only has .git directory when we start copying files over. Thus, files deleted from worktree will not suddenly appear in tarball.

In requireCommit: true mode we don't add --no-checkout, because we don't copy files.

Test Plan

Added test. Tested manually.

Side effect of this is that git status reports that all files have been deleted and there's a bunch of untracked files (which, git add-ed, make the repository appear as the source repo). I don't know how to copy the Git index 1-1…

Copy link

github-actions bot commented Feb 10, 2025

Size Change: +1.5 kB (0%)

Total Size: 53.4 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53.4 MB +1.5 kB (0%)

compressed-size-action

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.67%. Comparing base (78837a4) to head (71bcbe7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2900      +/-   ##
==========================================
+ Coverage   52.64%   52.67%   +0.03%     
==========================================
  Files         588      588              
  Lines       23186    23188       +2     
  Branches     4854     4856       +2     
==========================================
+ Hits        12204    12211       +7     
+ Misses      10016    10011       -5     
  Partials      966      966              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjchmiela sjchmiela marked this pull request as ready for review February 10, 2025 20:59
@sjchmiela sjchmiela requested a review from szdziedzic February 10, 2025 20:59
Copy link

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @radoslawkrzemien

Generated by CodeMention

@sjchmiela sjchmiela force-pushed the stanley/remove-deleted-files branch from 0737fda to fb2b1dc Compare February 11, 2025 12:08
Copy link

✅ Thank you for adding the changelog entry!

@sjchmiela sjchmiela merged commit 574bde9 into main Feb 11, 2025
10 checks passed
@sjchmiela sjchmiela deleted the stanley/remove-deleted-files branch February 11, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants