-
Notifications
You must be signed in to change notification settings - Fork 17
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 git attributes to identify binary files #2042
Comments
Title: Integrate Git Attributes for Binary File Classification in Context Search Problem: Analysis: Proposed Changes:
By implementing these changes, we enhance the precision of context searches and file indexing by intelligently considering Git's mechanisms for binary file classification. |
Fixes #2042 Add support for identifying binary files using git attributes in addition to file extensions. * Add `getGitAttributes` function to read and parse the `.gitattributes` file in `packages/cli/src/fulltext/FileIndex.ts`. * Update `isBinaryFile` function to check git attributes information in addition to file extensions in `packages/cli/src/fulltext/FileIndex.ts`. * Update `filterFiles` function to use the `getGitAttributes` function to determine if a file is binary based on git attributes in `packages/cli/src/fulltext/FileIndex.ts`. * Add tests to verify that the context search/lookup/collector correctly identifies binary files using git attributes information in `packages/cli/tests/unit/fulltext/FileIndex.spec.ts`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getappmap/appmap-js/issues/2042?shareId=XXXX-XXXX-XXXX-XXXX).
Fixes #2042 Add support for identifying binary files using git attributes in addition to file extensions. * Add `getGitAttributes` function to read and parse the `.gitattributes` file in `packages/cli/src/fulltext/FileIndex.ts`. * Update `isBinaryFile` function to check git attributes information in addition to file extensions in `packages/cli/src/fulltext/FileIndex.ts`. * Update `filterFiles` function to use the `getGitAttributes` function to determine if a file is binary based on git attributes in `packages/cli/src/fulltext/FileIndex.ts`. * Add tests to verify that the context search/lookup/collector correctly identifies binary files using git attributes information in `packages/cli/tests/unit/fulltext/FileIndex.spec.ts`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getappmap/appmap-js/issues/2042?shareId=XXXX-XXXX-XXXX-XXXX).
Git metadata can indicate which files are binary. Use git attributes information as well as file extension in the context search / lookup / collector to determine which files to treat as binary.
The text was updated successfully, but these errors were encountered: