Skip to content

Equip GitRepo.diffstatus() with typechange detection - #91

Closed
mih wants to merge 4 commits into
mainfrom
typechange
Closed

mih wants to merge 4 commits into
mainfrom
typechange

Conversation

@mih

@mih mih commented Jul 23, 2022 •

Copy link
Copy Markdown
Member

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

codecov Bot commented Jul 24, 2022 •

Copy link
Copy Markdown

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

mih commented May 17, 2023

Copy link
Copy Markdown
Member Author

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.

1 participant