dirhash-python icon indicating copy to clipboard operation
dirhash-python copied to clipboard

Revision control awareness for determining ignore paths

Open ruffsl opened this issue 4 years ago • 0 comments

It would be handy if dirhash was aware of any revision control system in effect for any subpaths it crawls through. For example, this could allow for dirhash to automatically pick up on any nested .gitignore files in subdirectories, effectively computing the hash for only the directory and files that git is tracking.

I'm working on an extension for a general build tool to track changes of source files to better cache build artifacts and save on build time. These source files are normally organized into package subdirectories in a repo checked out with revision control. These repos already include files like .gitignore to configure which file extensions or subpaths are ignored during commits.

Perhaps dirhash could include this feature or provide an plugin interface to support this for different revision control systems?

Related: https://github.com/colcon/colcon-package-selection/pull/44

ruffsl avatar Apr 11 '21 18:04 ruffsl