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

Equip GitRepo.diffstatus() with typechange detection #91

Closed
wants to merge 4 commits into from
Closed

Conversation

mih
Copy link
Member

@mih mih commented Jul 23, 2022

This can be a basis for implementing patch generation for diff.

This PR is the companion to datalad/datalad#6797 (which has been abandoned).

TODO

  • Prevent adding duplicate entries to .gitmodules datalad#7088 is added a slowing workaround to GitRepo.__save_add_submodules() due to the lack of type-annotation ability in core. In order to preserve the speed when handling large numbers of subdatasets, we better replace GitRepo.__save_add_submodules() in here too.

This can be a basis for implementing patch generation for `diff`.
@mih mih force-pushed the typechange branch 2 times, most recently from 0930a24 to ba4a503 Compare July 24, 2022 06:23
@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #91 (520f64c) into main (35af205) will decrease coverage by 4.54%.
The diff coverage is 95.29%.

@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
- Coverage   93.43%   88.89%   -4.55%     
==========================================
  Files          30       32       +2     
  Lines        2210     2828     +618     
==========================================
+ Hits         2065     2514     +449     
- Misses        145      314     +169     
Impacted Files Coverage Δ
datalad_next/patches/__init__.py 100.00% <ø> (ø)
datalad_next/patches/gitrepo.py 93.36% <93.36%> (ø)
datalad_next/patches/tests/test_gitrepo.py 100.00% <100.00%> (ø)
datalad_next/_version.py 45.39% <0.00%> (-54.61%) ⬇️
datalad_next/gitremote/datalad_annex.py 89.50% <0.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35af205...520f64c. Read the comment docs.

@mih
Copy link
Member Author

mih commented May 17, 2023

I am closing this PR after a year of nothingness. It can now join the original datalad/datalad#6797 in the afterlife.

The underlying issues remain, of course. Working on #361 I found different approaches to do this. Rather than an expensive patch (the approach here), I think a "change iterator" around git diff-index (and friends) would be a simpler approach.

The implementation that I am now abandoning here is already a half-step in that direction (git diff-files), and became the workhorse in gooey-status-light. The substantial speed differences compared to status in -core make it evident that going further in this direction is useful.

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.

None yet

1 participant