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

Use diff for tracked path statuses #466

Merged
merged 11 commits into from
May 24, 2021
Merged

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented May 24, 2021

4/5 master <- #463 <- #464 <- #465 <- this <- #467

This PR moves us from exclusively using status to derive the status of each of our tracked paths by using a combination of status and diff. The logic is as follows:

We use the output of diff for all statuses that are not modified. That means there is no difference between the output of diff and what we display for added, deleted, renamed & not in cache.
For modified we provide a status overlay. If the path is found in status it is essentially changed twice, once with respect to git (HEAD) and once with respect to dvc (cache). We give these paths the original modified status. If the path is not found in the status output then it is only modified with respect to git (HEAD) i.e the file matches what is expected by dvc (cache). We say that these path are stageModified i.e the data placeholders (or lock file) are ready to be committed into git.

For demos and further explanation see #318 (comment)

See #463 for description of chain.

@mattseddon mattseddon added the product PR that affects product label May 24, 2021
@mattseddon mattseddon self-assigned this May 24, 2021
@mattseddon mattseddon changed the base branch from master to add-new-decorations May 24, 2021 04:14
@mattseddon mattseddon force-pushed the use-diff-in-repo-status branch from a1b9c09 to 025a410 Compare May 24, 2021 06:08
@mattseddon mattseddon marked this pull request as ready for review May 24, 2021 06:26
@mattseddon mattseddon changed the title Use diff for tracked path status Use diff for tracked path statuses May 24, 2021
@mattseddon mattseddon force-pushed the use-diff-in-repo-status branch from e295af1 to 950436f Compare May 24, 2021 19:00
@mattseddon mattseddon force-pushed the add-new-decorations branch from b1cec0c to ce6c696 Compare May 24, 2021 19:02
@mattseddon mattseddon force-pushed the use-diff-in-repo-status branch from 950436f to 5d2a3ab Compare May 24, 2021 19:02
Base automatically changed from add-new-decorations to master May 24, 2021 19:07
@mattseddon mattseddon enabled auto-merge May 24, 2021 19:12
@codeclimate
Copy link

codeclimate bot commented May 24, 2021

Code Climate has analyzed commit e803274 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 95.2% (50% is the threshold).

This pull request will bring the total coverage in the repository to 88.2% (0.0% change).

View more on Code Climate.

@mattseddon mattseddon merged commit afb4ba6 into master May 24, 2021
@mattseddon mattseddon deleted the use-diff-in-repo-status branch May 24, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants