HomeSoftware Heritage

add path filtering to WalkEntry.changes()

Description

add path filtering to WalkEntry.changes()

Add a path_prefix argument to WalkEntry.changes() to let it compute only
the differences under a portion of the tree represented by the change.
This is slightly different than the paths argument to Repo.get_walker()
because it allows the Walker to produce WalkEntry objects for which
there are no changes under the path, and then realize that as the
calling code iterates over the results. This is useful in cases where
the caller needs to have access to all commits (for example, to see
where tags fall), but may only care about some actual file changes under
a portion of the repository.

Signed-off-by: Doug Hellmann <doug@doughellmann.com>

Details

Provenance
Doug Hellmann <doug@doughellmann.com>Authored on Dec 20 2016, 8:54 PM
ardumontPushed on Sep 27 2021, 5:34 PM
Parents
rPPDWfe54e04747d5: Fix formatting in NEWS.
Branches
Unknown
Tags
Unknown

Event Timeline